Skip to content

Commit

Permalink
Merge pull request #14 from iwehrman/iwehrman/load-dict-from-fs
Browse files Browse the repository at this point in the history
Support loading dictionaries from the filesystem in the browser
  • Loading branch information
takuyaa committed Mar 19, 2018
2 parents 0acbb7b + 1a9dc84 commit 5e6c6a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loader/BrowserDictionaryLoader.js
Expand Up @@ -41,8 +41,9 @@ BrowserDictionaryLoader.prototype.loadArrayBuffer = function (url, callback) {
xhr.open("GET", url, true);
xhr.responseType = "arraybuffer";
xhr.onload = function () {
if (this.status !== 200) {
if (this.status > 0 && this.status !== 200) {
callback(xhr.statusText, null);
return;
}
var arraybuffer = this.response;

Expand Down

0 comments on commit 5e6c6a1

Please sign in to comment.