Skip to content

Commit

Permalink
Fix #263 Dataview Representation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebavan committed Jun 26, 2023
1 parent b780db6 commit 131d7ab
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/spector.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions documentation/changeLogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Please, find below the per release summary of the contribution added to the proj
## v0.9.30
* Fix [Scissor function call](https://github.com/BabylonJS/Spector.js/issues/266)
* Fix [bufferSubData and getAttribLocation number report](https://github.com/BabylonJS/Spector.js/issues/262)
* Fix [Dataview representation](https://github.com/BabylonJS/Spector.js/issues/263)

## v0.9.29
* Add [WebXR tracking capabilities](https://github.com/BabylonJS/Spector.js/pull/257)
Expand Down
2 changes: 1 addition & 1 deletion extensions/spector.bundle.func.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion extensions/spector.bundle.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/backend/commands/baseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export abstract class BaseCommand {
if (args && args.length > 0) {
stringified += ": " + this.stringifyArgs(args).join(", ");
}
if (result) {
if (result !== undefined && result !== null) {
stringified += " -> " + this.stringifyResult(result);
}
return stringified;
Expand Down Expand Up @@ -164,6 +164,11 @@ export abstract class BaseCommand {
return "[..(" + value.length + ")..]";
}

// DataView
if (value.byteLength) {
return "[..(" + value.byteLength + ")..]";
}

return value;
}
}
2 changes: 1 addition & 1 deletion src/backend/commands/getAttribLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class GetAttribLocation extends BaseCommand {
}

protected stringifyResult(result: any): string {
if (!result) {
if (result === undefined || result === null) {
return undefined;
}

Expand Down

0 comments on commit 131d7ab

Please sign in to comment.