Skip to content

Commit

Permalink
Merge pull request #27 from oowl/patch-1
Browse files Browse the repository at this point in the history
Update angular-redactor.js
  • Loading branch information
Tyler Garlick committed Nov 20, 2014
2 parents d82b606 + db724fa commit 8e5405d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions angular-redactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
angular.extend(options, redactorOptions, additionalOptions);

// prevent collision with the constant values on ChangeCallback
if(!angular.isUndefined(redactorOptions.changeCallback)) {
options.changeCallback = function() {
updateModel.call(this);
redactorOptions.changeCallback.call(this);
var changeCallback = additionalOptions.changeCallback || redactorOptions.changeCallback;
if (changeCallback) {
options.changeCallback = function(value) {
updateModel.call(this, value);
changeCallback.call(this, value);
}
}

Expand Down

0 comments on commit 8e5405d

Please sign in to comment.