fuselibs icon indicating copy to clipboard operation
fuselibs copied to clipboard

Object.assign used in tests although not available in ES5

Open cbaggers opened this issue 7 years ago • 3 comments
trafficstars

Until we make the move to ES2015 and up this is still illegal

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign

https://github.com/fusetools/fuselibs-public/blob/master/Source/Fuse.Scripting.JavaScript/Tests/UX/TreeObservable.TwoWayArray.ux#L10

cbaggers avatar Dec 04 '17 10:12 cbaggers

Used in TreeObservable TwoWayArray test. here is the code:

tree.items = Object.assign([1,2,3], { __fuse_id: 1 });

cbaggers avatar Dec 04 '17 11:12 cbaggers

		var newItems = [1,2,3];
		newItems["__fuse_id"] = 1;
		tree.items = newItems;

will fix it

cbaggers avatar Dec 04 '17 11:12 cbaggers

We don't have any plans for using ES2015 and up inside JavaScript tags, so this will have to be fixed, indeed

kusma avatar Dec 04 '17 11:12 kusma