Commit fbf73b42 authored by yann300's avatar yann300

ensure token is set onActivation

parent bdb9904c
...@@ -26,6 +26,10 @@ export class CompilerImports extends Plugin { ...@@ -26,6 +26,10 @@ export class CompilerImports extends Plugin {
this.urlResolver.setGistToken(token, protocol) this.urlResolver.setGistToken(token, protocol)
} }
onActivation () {
this.setToken()
}
isRelativeImport (url) { isRelativeImport (url) {
return /^([^/]+)/.exec(url) return /^([^/]+)/.exec(url)
} }
...@@ -69,7 +73,6 @@ export class CompilerImports extends Plugin { ...@@ -69,7 +73,6 @@ export class CompilerImports extends Plugin {
let resolved let resolved
try { try {
await this.setToken()
resolved = await this.urlResolver.resolve(url) resolved = await this.urlResolver.resolve(url)
const { content, cleanUrl, type } = resolved const { content, cleanUrl, type } = resolved
self.previouslyHandled[url] = { self.previouslyHandled[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