Skip to content

Commit

Permalink
add condition to avoid extra calls in $watchers
Browse files Browse the repository at this point in the history
  • Loading branch information
krispo committed Jul 4, 2016
1 parent 4ccc827 commit 23d583e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dist/angular-nvd3.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
options = scope.options;
} else {
scope.options = options;

// return if options $watch is enabled
if (scope._config.deepWatchOptions && !scope._config.disabled) return;
}

// Clearing
Expand Down Expand Up @@ -229,6 +232,9 @@
data = scope.data;
} else {
scope.data = data;

// return if data $watch is enabled
if (scope._config.deepWatchData && !scope._config.disabled) return;
}

if (data) {
Expand Down
Loading

0 comments on commit 23d583e

Please sign in to comment.