We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[This is arguably a bug in can-reflect, but since can-diff is what changed recently, filing it here.]
This code is new in can-diff:
can-diff/list/list.js
Lines 43 to 45 in bb2fb96
One might expect that if oldListLength > 0, then oldListLength[0] would be present… but this isn’t always the case. 😅
oldListLength > 0
oldListLength[0]
I’m not 100% sure what code is responsible for making the list, but oldList is an array with objects at various indices, not including [0], so that line passes undefined to can-reflect.getSchema, which throws here: https://github.com/canjs/can-reflect/blob/339f55666ce3101482e5d3fc3262a7626ae6e63a/reflections/shape/schema/schema.js#L106
oldList
[0]
undefined
can-reflect.getSchema
If need be, I’m happy to pair on this to show it in a real project.
The text was updated successfully, but these errors were encountered:
getSchema should probably return undefined if undefined is passed.
Sorry, something went wrong.
Make getSchema return undefined when passed undefined
ddc86de
`canReflect.getSchema( undefined )` now returns `undefined` Fixes canjs/can-diff#2
chasenlehara
No branches or pull requests
[This is arguably a bug in can-reflect, but since can-diff is what changed recently, filing it here.]
This code is new in can-diff:
can-diff/list/list.js
Lines 43 to 45 in bb2fb96
One might expect that if
oldListLength > 0
, thenoldListLength[0]
would be present… but this isn’t always the case. 😅I’m not 100% sure what code is responsible for making the list, but
oldList
is an array with objects at various indices, not including[0]
, so that line passesundefined
tocan-reflect.getSchema
, which throws here: https://github.com/canjs/can-reflect/blob/339f55666ce3101482e5d3fc3262a7626ae6e63a/reflections/shape/schema/schema.js#L106If need be, I’m happy to pair on this to show it in a real project.
The text was updated successfully, but these errors were encountered: