Skip to content

Commit f31b3fe

Browse files
committed
fix arrow saver
1 parent afbe565 commit f31b3fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/perspective-jupyterlab/src/ts/renderer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ export class PerspectiveDocumentWidget extends DocumentWidget<PerspectiveWidget>
104104
this.context.save();
105105
});
106106
} else if (this._type === "arrow") {
107-
view.to_arrow().then((result: any) => {
107+
view.to_arrow().then((result: ArrayBuffer) => {
108108
console.log(result);
109-
this.context.model.fromString(result);
109+
const resultAsB64 = btoa(new Uint8Array(result).reduce((acc, i) => (acc += String.fromCharCode.apply(null, [i])), ""));
110+
this.context.model.fromString(resultAsB64);
110111
this.context.save();
111112
});
112113
} else if (this._type === "json") {

0 commit comments

Comments
 (0)