Skip to content

Commit d3ebd42

Browse files
committed
update() is now optional when creating a directive
1 parent f8e31f3 commit d3ebd42

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/directive.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ DirProto.refresh = function (value) {
149149
* Actually invoking the _update from the directive's definition
150150
*/
151151
DirProto.apply = function (value) {
152-
this._update(
153-
this.filters
154-
? this.applyFilters(value)
155-
: value
156-
)
152+
if (this._update) {
153+
this._update(
154+
this.filters
155+
? this.applyFilters(value)
156+
: value
157+
)
158+
}
157159
}
158160

159161
/**

0 commit comments

Comments
 (0)