This commit is contained in:
the1812 2019-06-02 13:22:42 +08:00
parent 4bc26a297b
commit 4791a29977
5 changed files with 10 additions and 10 deletions

View File

@ -1213,7 +1213,7 @@ class Resource
{
return this.text !== null;
}
constructor(url, { styles = [], alwaysPreview: false } = {})
constructor(url, { styles = [], alwaysPreview = false } = {})
{
this.rawUrl = Resource.root + "min/" + url;
this.dependencies = [];
@ -1227,7 +1227,7 @@ class Resource
}
get url()
{
if (this.alwaysPreview)
if (typeof offlineData === "undefined" && this.alwaysPreview)
{
return this.rawUrl.replace("/master/", "/preview/");
}

View File

@ -1213,7 +1213,7 @@ class Resource
{
return this.text !== null;
}
constructor(url, { styles = [], alwaysPreview: false } = {})
constructor(url, { styles = [], alwaysPreview = false } = {})
{
this.rawUrl = Resource.root + "min/" + url;
this.dependencies = [];
@ -1227,7 +1227,7 @@ class Resource
}
get url()
{
if (this.alwaysPreview)
if (typeof offlineData === "undefined" && this.alwaysPreview)
{
return this.rawUrl.replace("/master/", "/preview/");
}

View File

@ -1093,7 +1093,7 @@ class Resource
{
return this.text !== null;
}
constructor(url, { styles = [], alwaysPreview: false } = {})
constructor(url, { styles = [], alwaysPreview = false } = {})
{
this.rawUrl = Resource.root + "min/" + url;
this.dependencies = [];
@ -1107,7 +1107,7 @@ class Resource
}
get url()
{
if (this.alwaysPreview)
if (typeof offlineData === "undefined" && this.alwaysPreview)
{
return this.rawUrl.replace("/master/", "/preview/");
}

View File

@ -1093,7 +1093,7 @@ class Resource
{
return this.text !== null;
}
constructor(url, { styles = [], alwaysPreview: false } = {})
constructor(url, { styles = [], alwaysPreview = false } = {})
{
this.rawUrl = Resource.root + "min/" + url;
this.dependencies = [];
@ -1107,7 +1107,7 @@ class Resource
}
get url()
{
if (this.alwaysPreview)
if (typeof offlineData === "undefined" && this.alwaysPreview)
{
return this.rawUrl.replace("/master/", "/preview/");
}

View File

@ -4,7 +4,7 @@ export class Resource
{
return this.text !== null;
}
constructor(url, { styles = [], alwaysPreview: false } = {})
constructor(url, { styles = [], alwaysPreview = false } = {})
{
this.rawUrl = Resource.root + "min/" + url;
this.dependencies = [];
@ -18,7 +18,7 @@ export class Resource
}
get url()
{
if (this.alwaysPreview)
if (typeof offlineData === "undefined" && this.alwaysPreview)
{
return this.rawUrl.replace("/master/", "/preview/");
}