Commit 09471ee2 authored by Mike Greiling's avatar Mike Greiling

fix bug in call to monaco.Uri. first param is checked with `typeof param ===...

fix bug in call to monaco.Uri.  first param is checked with `typeof param === 'object'` which is true for `null` due to a JS quirk
parent 6d96b9dd
...@@ -13,12 +13,12 @@ export default class Model { ...@@ -13,12 +13,12 @@ export default class Model {
(this.originalModel = this.monaco.editor.createModel( (this.originalModel = this.monaco.editor.createModel(
head ? head.content : this.file.raw, head ? head.content : this.file.raw,
undefined, undefined,
new this.monaco.Uri(null, null, `original/${this.path}`), new this.monaco.Uri(false, false, `original/${this.path}`),
)), )),
(this.model = this.monaco.editor.createModel( (this.model = this.monaco.editor.createModel(
this.content, this.content,
undefined, undefined,
new this.monaco.Uri(null, null, this.path), new this.monaco.Uri(false, false, this.path),
)), )),
); );
if (this.file.mrChange) { if (this.file.mrChange) {
...@@ -26,7 +26,7 @@ export default class Model { ...@@ -26,7 +26,7 @@ export default class Model {
(this.baseModel = this.monaco.editor.createModel( (this.baseModel = this.monaco.editor.createModel(
this.file.baseRaw, this.file.baseRaw,
undefined, undefined,
new this.monaco.Uri(null, null, `target/${this.path}`), new this.monaco.Uri(false, false, `target/${this.path}`),
)), )),
); );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment