cedricpinson / osgjs

Javascript Implementation of OpenSceneGraph [DISCONTINUED] Website archived https://cedricpinson.github.io/osgjs-website/
MIT License
786 stars 202 forks source link

Fix zip loading #1005

Open samylan opened 5 years ago

samylan commented 5 years ago

test-zip-loading.zip This patch resolve some problems I encountered while trying to load zip files from a server :

Here is the error I would get when loading a zip file without the return statements :

Unhandled rejection readNodeURL/<@webpack:///./sources/osgPlugins/ReaderWriterZIP.js?:49:13
r@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:31:9667
[22]</e.exports/i.prototype._settlePromiseFromHandler@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:14825
[22]</e.exports/i.prototype._settlePromise@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:15628
[22]</e.exports/i.prototype._settlePromise0@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:16329
[22]</e.exports/i.prototype._settlePromises@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:17684
c@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1555
a@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1496
[2]</r.prototype._drainQueues@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:3106
r/this.drainQueues@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1236

Here is a test case to be used in the examples folder : test-zip-loading.zip