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__);