We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 252d2d4 commit 21a1805Copy full SHA for 21a1805
src/modules/reactive.js
@@ -165,8 +165,12 @@ angular.module(name, [
165
activeObservation = handle.observation;
166
modelData = handle.data;
167
168
- const diff = jsondiffpatch.diff(lastModelData, modelData);
169
- vm[k] = jsondiffpatch.patch(lastModelData, diff);
+ if (lastModelData.length !== 0) {
+ const diff = jsondiffpatch.diff(lastModelData, modelData);
170
+ vm[k] = jsondiffpatch.patch(lastModelData, diff);
171
+ } else {
172
+ vm[k] = modelData;
173
+ }
174
175
lastModel = model;
176
lastModelData = modelData;
0 commit comments