Commit 03cf7407 authored by ioedeveloper's avatar ioedeveloper Committed by yann300

Set url resolver if token is found

parent 86061777
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment