Skip to content

Commit

Permalink
fixes #75
Browse files Browse the repository at this point in the history
  • Loading branch information
capaj committed Apr 16, 2016
1 parent f8674d4 commit 0a9f98c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hot-reloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ class HotReloader extends Emitter {
this.currentHotReload = null
d('all reimported in ', new Date().getTime() - start, 'ms')
}, (err) => {
Object.keys(this.modulesJustDeleted).forEach((modName) => {
d('deleting on failed reimport: ', modName) // failed import of a module leaves something in the SystemJS module cache, even though it is not visible in System._loader.moduleRecords we need to delete the module to revert to clean state
System.delete(modName)
})
this.emit('error', err)
console.error('Module "' + toReimport + '" reimport failed because this error was thrown: ', err)
this.failedReimport = toReimport
Expand Down

0 comments on commit 0a9f98c

Please sign in to comment.