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 b1ef617 commit bcfb5ceCopy full SHA for bcfb5ce
public/legacy.ts
@@ -4,10 +4,10 @@ import {XmlElement} from "../editable";
4
import {genBlob} from "../internal/gen";
5
import {mapPoints} from "../internal/util";
6
7
-// TODO check if file (ex. file://...)
8
const isBrowser = new Function("try {return this===window;}catch(e){ return false;}");
9
const isLocalhost = () => location.hostname === "localhost" || location.hostname === "127.0.0.1";
10
-if (!isBrowser() || (isBrowser() && isLocalhost())) {
+const isFile = () => location.protocol === "file:";
+if (!isBrowser() || isLocalhost() || isFile()) {
11
console.warn("You are using the legacy blobs API!\nPlease use 'blobs/v2' instead.");
12
}
13
0 commit comments