扩展的enable为void 0的时候,改为true

This commit is contained in:
nonameShijian 2024-02-16 19:03:54 +08:00
parent e1ba7d315d
commit de01d255b0
1 changed files with 3 additions and 0 deletions

View File

@ -4634,6 +4634,9 @@ export class Game extends Uninstantable {
* @param { string } extensionName
*/
static hasExtension(extensionName) {
if (typeof lib.config[`extension_${extensionName}_enable`] != 'boolean') {
game.saveExtensionConfig(extensionName, 'enable', true);
}
return this.hasExtensionInstalled(extensionName) && lib.config[`extension_${extensionName}_enable`];
}
/**