Skip to content

Commit

Permalink
fixed apply miximum call - #723
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Jan 11, 2018
1 parent c827750 commit bd90d0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/wepy/src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,12 @@ export default class {
let k;
let originData = this.$data;
this.$$phase = '$digest';
this.$$dc = 0;
while (this.$$phase) {
this.$$dc++;
if (this.$$dc >= 3) {
throw new Error('Can not call $apply in $apply process');
}
let readyToSet = {};
if (this.computed) {
for (k in this.computed) { // If there are computed property, calculated every times
Expand Down

0 comments on commit bd90d0d

Please sign in to comment.