Fix custom CSS editor

This commit is contained in:
Samuel Elliott 2018-07-07 14:37:04 +01:00
parent f2c31d866d
commit ab13e716ad
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 4 additions and 1 deletions

View File

@ -66,8 +66,11 @@ class PatchedBrowserWindow extends BrowserWindow {
super(options);
this.__bd_preload = [originalOptions.webPreferences.preload];
this.__bd_preload = [];
if (originalOptions.webPreferences && originalOptions.webPreferences.preload) {
this.__bd_preload.push(originalOptions.webPreferences.preload);
}
if (userOptions.webPreferences && userOptions.webPreferences.preload) {
this.__bd_preload.push(path.resolve(_dataPath, userOptions.webPreferences.preload));
}