Permalink
Browse files

fix(view-engine): use .address in case of RegistryEntry

  • Loading branch information...
StrahilKazlachev committed Aug 12, 2017
1 parent a93206a commit ab1064cc296b8ce802b4d3dbe439950fd59bde41
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/view-engine.js
View
@@ -102,9 +102,10 @@ export class ViewEngine {
loadContext = loadContext || new ResourceLoadContext();
return ensureRegistryEntry(this.loader, urlOrRegistryEntry).then(registryEntry => {
const url = typeof urlOrRegistryEntry === 'string' ? urlOrRegistryEntry : urlOrRegistryEntry.address;
if (registryEntry.onReady) {
if (!loadContext.hasDependency(urlOrRegistryEntry)) {
loadContext.addDependency(urlOrRegistryEntry);
if (!loadContext.hasDependency(url)) {
loadContext.addDependency(url);
return registryEntry.onReady;
}
@@ -116,7 +117,7 @@ export class ViewEngine {
return Promise.resolve(new ProxyViewFactory(registryEntry.onReady));
}
loadContext.addDependency(urlOrRegistryEntry);
loadContext.addDependency(url);
registryEntry.onReady = this.loadTemplateResources(registryEntry, compileInstruction, loadContext, target).then(resources => {
registryEntry.resources = resources;

0 comments on commit ab1064c

Please sign in to comment.