Fixed event listener pileup
refs https://github.com/TryGhost/Toolbox/issues/135 - When instantiating new Urls/Resources object in the UrlService's init on every test suite start it was loosing track of past events (softReset wasn't doing the cleanup properly). Not initializing new classes "fixes" the problem partially, by not loosing track of those event listeners. The real fix should be proper even listener cleanup on every soft reset!
This commit is contained in:
parent
34b0196c0f
commit
ae5dd8ad30
@ -332,13 +332,8 @@ class UrlService {
|
||||
}
|
||||
|
||||
if (persistedUrls && persistedResources) {
|
||||
this.urls = new Urls({
|
||||
urls: persistedUrls
|
||||
});
|
||||
this.resources = new Resources({
|
||||
queue: this.queue,
|
||||
resources: persistedResources
|
||||
});
|
||||
this.urls.urls = persistedUrls;
|
||||
this.resources.data = persistedResources;
|
||||
this.resources.initResourceConfig();
|
||||
this.resources.initEvenListeners();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user