Fix build
This commit is contained in:
parent
39ce276c46
commit
7a27075adb
1 changed files with 5 additions and 0 deletions
|
@ -172,6 +172,11 @@ export default class ScriptUtils {
|
||||||
headers?: any,
|
headers?: any,
|
||||||
timeoutSecs?: number
|
timeoutSecs?: number
|
||||||
): Promise<{ content: string } | { redirect: string } | "timeout"> {
|
): Promise<{ content: string } | { redirect: string } | "timeout"> {
|
||||||
|
if(url.startsWith("./")){
|
||||||
|
return Promise.resolve({content: readFileSync(url, "utf8")})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const requestPromise = new Promise((resolve, reject) => {
|
const requestPromise = new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
headers = headers ?? {}
|
headers = headers ?? {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue