extensionSystem: Unload stylesheet if extension is not loaded
We should not keep any reference to an extension custom stylesheet in case we
got an error while enabling that
(cherry picked from commit 3aea290adc
)
This commit is contained in:
parent
73649a0d6a
commit
e027af9548
@ -136,6 +136,10 @@ function enableExtension(uuid) {
|
|||||||
_signals.emit('extension-state-changed', extension);
|
_signals.emit('extension-state-changed', extension);
|
||||||
return;
|
return;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
if (extension.stylesheet) {
|
||||||
|
theme.unload_stylesheet(extension.stylesheet);
|
||||||
|
delete extension.stylesheet;
|
||||||
|
}
|
||||||
logExtensionError(uuid, e);
|
logExtensionError(uuid, e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user