Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
fix: onLoad called in the middle of the options
Browse files Browse the repository at this point in the history
Call the onLoad call back at the end of the options process.

Close #93
  • Loading branch information
douglasduteil committed Jan 14, 2015
1 parent 68e07e3 commit 5b1a317
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/ui-ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ angular.module('ui.ace', [])
]);
}

// onLoad callbacks
angular.forEach(opts.callbacks, function (cb) {
if (angular.isFunction(cb)) {
cb(acee);
}
});

// Basic options
if (angular.isString(opts.theme)) {
acee.setTheme('ace/theme/' + opts.theme);
Expand Down Expand Up @@ -122,6 +115,13 @@ angular.module('ui.ace', [])
acee.renderer.setOption(obj.name, obj.value);
}
}

// onLoad callbacks
angular.forEach(opts.callbacks, function (cb) {
if (angular.isFunction(cb)) {
cb(acee);
}
});
};

return {
Expand Down

0 comments on commit 5b1a317

Please sign in to comment.