diff --git a/gulpfile.js b/gulpfile.js index 415f734..e62b472 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -32,7 +32,6 @@ gulp.task('css', function(){ gulp.task("mp3", function () { return gulp.src("src/js/mp3/*.js") - .pipe(babel()) .pipe(uglify()) .pipe(concat("mp3-min.js")) .pipe(gulp.dest("lib")); diff --git a/src/js/ResourcePack.js b/src/js/ResourcePack.js index 4dd4d0b..a337a4f 100644 --- a/src/js/ResourcePack.js +++ b/src/js/ResourcePack.js @@ -104,7 +104,7 @@ Respack.prototype.getBlob = function(url, progress) { resolve(req.response); }; req.onerror = function() { - reject(Error("Could not load respack at URL" + url)); + reject(Error("Could not fetch respack at URL" + url)); }; req.onprogress = event => { if (event.lengthComputable) { @@ -117,6 +117,9 @@ Respack.prototype.getBlob = function(url, progress) { } }; req.send(); + }).catch(error => { + // Infinitely more useful than the error Same Origin gives + throw Error("Could not fetch respack at URL" + url); }); }