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 @@
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+