From 03cf7407dc1763a0db7d106948ed38dc9a43818b Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 9 Aug 2021 12:37:50 +0100 Subject: [PATCH] Set url resolver if token is found --- .../remix-core-plugin/src/lib/compiler-content-imports.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index 93d8b61e5c..edb512a7ed 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -21,14 +21,14 @@ export class CompilerImports extends Plugin { } async setToken () { - const protocol = typeof window !== 'undefined' && window.location.protocol - let token try { - token = await this.call('settings', 'get', 'settings/gist-access-token') + const protocol = typeof window !== 'undefined' && window.location.protocol + const token = await this.call('settings', 'get', 'settings/gist-access-token') + + this.urlResolver.setGistToken(token, protocol) } catch (error) { console.log(error) } - this.urlResolver.setGistToken(token, protocol) } isRelativeImport (url) {