common: build fixes

This commit is contained in:
Koushik Dutta
2025-03-11 10:05:24 -07:00
parent 64fa68f2d0
commit 5e3d1c423c
2 changed files with 4 additions and 2 deletions

View File

@@ -77,5 +77,5 @@ export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
this.storage.setItem('hasEnabledMixin', JSON.stringify(this.hasEnabledMixin));
}
abstract canMixin(type: ScryptedDeviceType, interfaces: string[]): Promise<string[] | null | undefined | void>;
abstract canMixin(type: ScryptedDeviceType | string, interfaces: string[]): Promise<string[] | null | undefined | void>;
}

View File

@@ -23,7 +23,9 @@ export function createService<T, V>(options: ForkOptions, create: (t: Promise<T>
currentFork = sdk.fork<T>(options);
currentFork.worker.on('exit', () => currentResult = undefined);
currentResult = create(currentFork.result);
currentResult.catch(() => currentResult = undefined);
currentResult.catch(() => {
currentResult = undefined;
});
return currentResult;
},