Skip to content

Commit

Permalink
issue 78 Fix bug with unregistering
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBarnabe committed Dec 9, 2013
1 parent 5265cbe commit 0a56d3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/stylishStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,14 @@ Style.prototype = {
if (this.shouldUnregisterOnLoad()) {
unregisterUrl = this.dataUrl;
unregisterMethod = this.calculateRegistrationMethod();
}
else {
} else if (this.appliedInfo == null) {
// not registered in the first place
return;
} else {
unregisterUrl = this.appliedInfo[0];
unregisterMethod = this.appliedInfo[1];
}
if (unregisterUrl == null) {
return;
}

if (this.sss.sheetRegistered(unregisterUrl, unregisterMethod))
this.sss.unregisterSheet(unregisterUrl, unregisterMethod);
// ignore unregistered styles if stylish isn't on
Expand Down

0 comments on commit 0a56d3e

Please # to comment.