-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
use .slice
when .toArray
is not present
#10
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ember-drag-drop ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Any progress on this one? I am encountering this issue as I wanted to perform Ember upgrade. |
@artemgurzhii thank you! Do you think you could add a test case to ensure this is working as expected now and in the future? |
@SergeAstapov sure, I can try to. do you have ideas on how you would expect it to be tested? |
@bvedad I have added <script>
// TODO: remove once https://github.com/adopted-ember-addons/ember-drag-drop/pull/10 is merged & released
Array.prototype.toArray = function() {
return this.slice();
};
</script> to Or you can also try to install a forked version, ie replace |
as far as I can see, it's a problem with as far as I can see, this PR makes it possible to pass to We have tests in https://github.com/adopted-ember-addons/ember-drag-drop/blob/main/test-app/tests/integration/components/sortable-objects-test.js#L10 that all verify it works with Hence, could you please add a test case in https://github.com/adopted-ember-addons/ember-drag-drop/blob/main/test-app/tests/integration/components/sortable-objects-test.js#L10 to test let nativePojoData = [
{ id: 1, title: 'Number 1' },
{ id: 2, title: 'Number 2' },
{ id: 3, title: 'Number 3' },
{ id: 4, title: 'Number 4' },
]; |
@SergeAstapov I'm not sure that it would work, as it requires environment config change like so: EmberENV: {
EXTEND_PROTOTYPES: false,
}, as if not - Ember would globally define their custom array methods on the global array prototype, which means that all arrays( |
@artemgurzhii I would say this what we gonna do anyways to ensure support of newer versions of Ember.js where prototype extensions being deprecated and removed |
@SergeAstapov should we then disable prototype extensions to test that functionality explicitly? |
@artemgurzhii yes, I believe so - that way we can explicitly pass both native Array and EmberArray as arguments |
No description provided.