Skip to content

Commit 44ac472

Browse files
committed
fix: crash if items were not objects
1 parent 3f5cfbd commit 44ac472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/collectionview/index-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export abstract class CollectionViewBase extends View implements CollectionViewD
251251
if (view) {
252252
// we check old bindingContext to see if properties disappeared.
253253
// if so we set them to null for the View to update
254-
if (view.bindingContext && view.bindingContext !== context) {
254+
if (view.bindingContext && view.bindingContext !== context && typeof context === 'object') {
255255
Object.keys(view.bindingContext).forEach((k) => {
256256
if (!context.hasOwnProperty(k)) {
257257
context[k] = null;

0 commit comments

Comments
 (0)