montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 183 forks source link

collections breaks Objection #220

Open erothmayer opened 5 years ago

erothmayer commented 5 years ago

Installing collections@latest (currently 5.1.8) alongside Objection (a DB ORM) causes unexpected failures. It looks like it's probably due to a regression in the Array.find behavior (https://github.com/montagejs/collections/issues/165) which has been reported several times, as it works correctly if I install collections@2.0.3

erothmayer commented 5 years ago

Also https://github.com/montagejs/collections/issues/185

codebling commented 5 years ago

See also issues #36 #70 #94 #95 #116 #139 #145 #162 #165 #169 #178 #182 #185 #197 #215 #220 and PRs #94 #95 #116 #173 #189 #212. Branch v2 fixes these issues by avoiding global object modification.

mrsurname commented 5 years ago

Same issue for me https://github.com/Vincit/objection.js/issues/1350

ssantanuberaa commented 5 years ago

Also check the section 14.6, there is a prototype based fast-map in the index.js file. I guess it is supposed to mark the map in the fast-map object. And that's whey the previous issue on the fast-map object mapping was not working. This can be fixed by calling the following method -- addFastMap(prototype.fastMap[index]); Here index is the map index in the fast-map array.