Skip to content

Commit

Permalink
fix: default to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
wkolod committed Feb 9, 2024
1 parent 92ce248 commit d1396bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class StackService extends NodeService<Stack> {
* @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<FileVersionData> {
public async getVersion(stackId: string, index?: number, options: FileGetOptions = { responseType: 'arraybuffer' }): Promise<FileVersionData> {
const service = new FileService(this.wallet, this.api);
const stackProto = await this.api.getNode<Stack>(stackId, objectType.STACK);
const stack = new Stack(stackProto, stackProto.__keys__);
Expand Down

0 comments on commit d1396bc

Please sign in to comment.