Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't define property "Promise": Object is not extensible in firefox sdk #309

Closed
recky opened this issue Jun 22, 2016 · 2 comments
Closed
Labels

Comments

@recky
Copy link

recky commented Jun 22, 2016

Hello, i using jszip for create addons firefox sdk, but i have error like this :

 - _errorType = TypeError
    - message = can't define property "Promise": Object is not extensible
    - fileName = resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://social-scrape-at-socialsuite-dot-co/data/plugins/jszip.js
    - lineNumber = 5305

@dduponchel dduponchel added the bug label Jul 10, 2016
@dduponchel
Copy link
Collaborator

It seems to be the same as #304.

dduponchel added a commit to dduponchel/jszip that referenced this issue Jul 24, 2016
Importing `es6-promise` had a side effect: this library replaces the
global Promise object (Stuk#304) (or tries to, Stuk#309). This is an intended
side effect from this library and while its version 4 should give us a
switch for this behavior, I don't know when it will be out (the master
branch of this project still auto replace the Promise).

I replaced it by `vow` which match the requirements:
- a Promise implementation
- a lightweight one
- works in IE6
- doesn't have too many dependencies

If a global Promise already exists, prefer it: a native promise is
likely to be better integrated anyway (unhandledRejection in node) and
some libraries (zone.js for example) replace global objects (Stuk#303).

I think it is enough for a semver minor version.

Fix Stuk#303 Stuk#304 Stuk#309
@dduponchel
Copy link
Collaborator

Fixed in v3.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants