Skip to content

Commit

Permalink
fix: get correct url when create notebook file
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector authored and sunshinesmilelk committed Mar 19, 2024
1 parent a480bc1 commit 6ecfa3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/libro-kernel/src/contents/contents-drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export class Drive implements IContentsDrive {
*/
async newUntitled(options: IContentsCreateOptions = {}): Promise<IContentsModel> {
let body = '{}';
const url = this.getUrl(options.baseUrl, options.path ?? '');
const settings = this._getSettings(options.baseUrl);

if (options) {
if (options.ext) {
options.ext = normalizeExtension(options.ext);
Expand All @@ -179,7 +181,6 @@ export class Drive implements IContentsDrive {
body = JSON.stringify(options);
}

const url = this.getUrl(options.baseUrl, options.path ?? '');
const init = {
method: 'POST',
body,
Expand Down

0 comments on commit 6ecfa3f

Please sign in to comment.