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

Resource instance fetch() throws when called with no arguments #6206

Closed
thw0rted opened this issue Feb 12, 2018 · 1 comment
Closed

Resource instance fetch() throws when called with no arguments #6206

thw0rted opened this issue Feb 12, 2018 · 1 comment

Comments

@thw0rted
Copy link
Contributor

Run this Sandcastle, check the (actual, browser) console. You will see

Cannot add property method, object is not extensible

Somebody, somewhere, is freezing the return value from defaultClone before options.method is assigned here, only in the case where options is undefined. As you can see in the example, passing an empty object works around this. The cheap fix would be to change L1106 to options = defaultClone(options || {}, defaultValue.EMPTY_OBJECT); but it would probably be more helpful in the long run to ensure that defaultClone can never return a frozen object.

Also, in filing this issue, I discovered that your sample data for the "GeoJSON and TopoJSON" Sandcastle demo is missing -- just open that page and try to click any button, you should get a 404.

@hpinkos
Copy link
Contributor

hpinkos commented Feb 12, 2018

Thanks @thw0rted! I've submitted a PR to fix this here: #6210

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

No branches or pull requests

2 participants