diff --git a/bridges/nodejs/src/sdk/memory.ts b/bridges/nodejs/src/sdk/memory.ts index 5181aaa0..2f5e271d 100644 --- a/bridges/nodejs/src/sdk/memory.ts +++ b/bridges/nodejs/src/sdk/memory.ts @@ -61,6 +61,7 @@ export class Memory { `You cannot read the memory "${this.name}" as it belongs to another skill which haven't written to this memory yet` ) } + try { if (!fs.existsSync(this.memoryPath)) { await this.clear() diff --git a/bridges/nodejs/src/sdk/widget.ts b/bridges/nodejs/src/sdk/widget.ts index 2c6070b9..8a32e90c 100644 --- a/bridges/nodejs/src/sdk/widget.ts +++ b/bridges/nodejs/src/sdk/widget.ts @@ -2,7 +2,7 @@ export abstract class Widget { public readonly type: string public readonly options: T - public constructor(options: T) { + protected constructor(options: T) { this.type = this.constructor.name this.options = options }