From d1396bca4faa56135122cc9fd75faf15a0d6e952 Mon Sep 17 00:00:00 2001 From: Weronika K Date: Fri, 9 Feb 2024 14:33:39 +0100 Subject: [PATCH] fix: default to latest version --- src/core/stack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/stack.ts b/src/core/stack.ts index 9b6c588..f0d8a57 100644 --- a/src/core/stack.ts +++ b/src/core/stack.ts @@ -122,7 +122,7 @@ class StackService extends NodeService { * @param {number} [index] stack version index * @returns Promise with version name & data stream or buffer */ - public async getVersion(stackId: string, index: number = 0, options: FileGetOptions = { responseType: 'arraybuffer' }): Promise { + public async getVersion(stackId: string, index?: number, options: FileGetOptions = { responseType: 'arraybuffer' }): Promise { const service = new FileService(this.wallet, this.api); const stackProto = await this.api.getNode(stackId, objectType.STACK); const stack = new Stack(stackProto, stackProto.__keys__);