mirror of https://github.com/coder/code-server.git
Fix #251
This commit is contained in:
parent
400fba7f6f
commit
2f27b5df8c
|
@ -46,7 +46,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||
return oldSrc!.get!.call(img);
|
||||
},
|
||||
set: (value: string): void => {
|
||||
value = value.replace(/file:\/\//g, "/resource");
|
||||
if (value) {
|
||||
value = value.replace(/file:\/\//g, "/resource");
|
||||
}
|
||||
oldSrc!.set!.call(img, value);
|
||||
},
|
||||
});
|
||||
|
@ -65,7 +67,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||
return oldInnerHtml!.get!.call(style);
|
||||
},
|
||||
set: (value: string): void => {
|
||||
value = value.replace(/file:\/\//g, "/resource");
|
||||
if (value) {
|
||||
value = value.replace(/file:\/\//g, "/resource");
|
||||
}
|
||||
oldInnerHtml!.set!.call(style, value);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue