diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e61d2b6d..82a3ce8f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ on: jobs: test: - runs-on: ubuntu-18.04 # runs a test on Ubuntu, Windows and macOS + runs-on: [self-hosted, linux, x64, aws-us] # runs a test on Ubuntu, Windows and macOS steps: - name: Build run: | diff --git a/package.json b/package.json index 54ab1061..5a24cc8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ngiq/brainbrowser", - "version": "2.9.5", + "version": "2.9.6", "license": "GNU Affero GPL 3.0", "devDependencies": { "bower": "~1.8.8", diff --git a/src/brainbrowser/lib/loader.js b/src/brainbrowser/lib/loader.js index 18a2b781..1dabcf56 100644 --- a/src/brainbrowser/lib/loader.js +++ b/src/brainbrowser/lib/loader.js @@ -126,6 +126,15 @@ } catch (e) { /* pako probably didn't recognize this as gzip. */ + try { + if (content_type === "text") { + var dv = new DataView(result); + var decoder = new TextDecoder(); + result = decoder.decode(dv); + } + } catch (error) { + // + } } finally { try { if (canCache) {