mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-06 21:37:50 +00:00
fix: Make sure to remove the stylesheets before removing the file, b=(no-bug), c=mods
This commit is contained in:
@@ -149,12 +149,10 @@ var gZenThemesImporter = new (class {
|
||||
|
||||
async removeStylesheet() {
|
||||
await this.sss.unregisterSheet(this.styleSheetURI, this.sss.AGENT_SHEET);
|
||||
const rv = this.sss.sheetRegistered(this.styleSheetURI, this.sss.AGENT_SHEET);
|
||||
await IOUtils.remove(this.styleSheetPath, { ignoreAbsent: true });
|
||||
|
||||
if (
|
||||
!this.sss.sheetRegistered(this.styleSheetURI, this.sss.AGENT_SHEET) &&
|
||||
!(await IOUtils.exists(this.styleSheetPath))
|
||||
) {
|
||||
if (!rv && !(await IOUtils.exists(this.styleSheetPath))) {
|
||||
console.debug('[ZenThemesImporter]: Sheet successfully unregistered');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user