Skip to content

Commit aa5abed

Browse files
committed
fix(web_platform): include selector in viewFactoryCache key
1 parent 997da68 commit aa5abed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/core_dom/web_platform.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ class PlatformViewCache implements ViewCache {
9191
}
9292

9393
async.Future<ViewFactory> fromUrl(String url, DirectiveMap directives) {
94-
ViewFactory viewFactory = viewFactoryCache.get(url);
94+
var key = "[$selector]$url";
95+
ViewFactory viewFactory = viewFactoryCache.get(key);
9596
if (viewFactory == null) {
9697
return http.get(url, cache: templateCache).then((resp) {
9798
var viewFactoryFromHttp = fromHtml(resp.responseText, directives);
98-
viewFactoryCache.put(url, viewFactoryFromHttp);
99+
viewFactoryCache.put(key, viewFactoryFromHttp);
99100
return viewFactoryFromHttp;
100101
});
101102
}

0 commit comments

Comments
 (0)