From 2cab461a87c70156838d3471c6cfa05990c3b09e Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 27 Jul 2016 15:09:42 -0700 Subject: [PATCH] [apply shim] Track dependencies for mixins before creation Fixes #3802 (again) --- src/lib/apply-shim.html | 8 ++++- test/unit/styling-cross-scope-apply.html | 46 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/lib/apply-shim.html b/src/lib/apply-shim.html index 941c46c680..42b1504fa0 100644 --- a/src/lib/apply-shim.html +++ b/src/lib/apply-shim.html @@ -99,7 +99,13 @@ function mapGet(name) { name = name.trim(); - return mixinMap[name]; + var entry = mixinMap[name]; + // if the mixin is not defined, make an entry so we can set up dependencies correctly + if (!entry) { + mapSet(name, {}); + entry = mixinMap[name]; + } + return entry; } // "parse" a mixin definition into a map of properties and values diff --git a/test/unit/styling-cross-scope-apply.html b/test/unit/styling-cross-scope-apply.html index 379c0db7b8..bd6c299bb2 100644 --- a/test/unit/styling-cross-scope-apply.html +++ b/test/unit/styling-cross-scope-apply.html @@ -533,6 +533,43 @@ } + + + + + + + + + +