Skip to content

Commit

Permalink
Merge pull request #42 from headquarters/catch-errors
Browse files Browse the repository at this point in the history
Catch errors if asset-map fails to load
  • Loading branch information
RuslanZavacky committed Oct 29, 2018
2 parents 5aa1caa + 6efe719 commit dc69be4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addon/initializers/asset-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ export function initialize(app) {
prepend: map.prepend,
enabled: true
});
}).then(() => {
})
.then(() => {
app.register('service:asset-map', AssetMap);
})
.catch((err) => {
console.error('Failed to register service:asset-map', err);
})
.finally(() => {
app.advanceReadiness();
});
}
Expand Down

0 comments on commit dc69be4

Please sign in to comment.