We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e082fe8 commit d3eacdfCopy full SHA for d3eacdf
packages/my-shared-docprovider/src/drive.ts
@@ -207,7 +207,12 @@ export class MySharedDrive extends Drive implements ICollaborativeDrive {
207
this._providers.set(key, provider);
208
209
this._app.serviceManager.contents.get(options.path, { content: true }).then(model => {
210
- const content = model.format === 'base64' ? atob(model.content) : model.content;
+ let content = model.content;
211
+ if (model.format === 'base64') {
212
+ content = atob(content);
213
+ } else if (model.format === 'json') {
214
+ content = JSON.stringify(content);
215
+ }
216
provider.setSource(content);
217
});
218
0 commit comments