Skip to content

Commit

Permalink
update() is now optional when creating a directive
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 22, 2014
1 parent f8e31f3 commit d3ebd42
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,13 @@ DirProto.refresh = function (value) {
* Actually invoking the _update from the directive's definition
*/
DirProto.apply = function (value) {
this._update(
this.filters
? this.applyFilters(value)
: value
)
if (this._update) {
this._update(
this.filters
? this.applyFilters(value)
: value
)
}
}

/**
Expand Down

0 comments on commit d3ebd42

Please sign in to comment.