These are chat archives for canjs/canjs
I've run into a weird module loading problem.
I have a 2.x can.Model with a typed - another 2.x can.Model - array attribute, defined using can-map-define.
I've noticed that the array attribute does not get "typed" (not array of other can.Model instances) at random intervals.
Let's say from 10 reload it does not get "typed" in 1 or 2 cases.
I've finally hunt it down.
If can-list.js's type() overload loads first and then can-map-define.js's type() overload then everything works fine.
But with opposite loading order can-list.js's type() function is called (not can-map-define.js's type() function) in can-map.js _set() which gives fault results.
I'm using requirejs with AMD CanJS 3 modules.
As a workaround I modified can-map-define.js and require can-list to ensure the right order.
What do you think about this solution? I could live with this workaround but I'm scared a bit because I don't know how many similar situations there are.