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

Commit 5b1a317

Browse files
committed
fix: onLoad called in the middle of the options
Call the onLoad call back at the end of the options process. Close #93
1 parent 68e07e3 commit 5b1a317

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ui-ace.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ angular.module('ui.ace', [])
7979
]);
8080
}
8181

82-
// onLoad callbacks
83-
angular.forEach(opts.callbacks, function (cb) {
84-
if (angular.isFunction(cb)) {
85-
cb(acee);
86-
}
87-
});
88-
8982
// Basic options
9083
if (angular.isString(opts.theme)) {
9184
acee.setTheme('ace/theme/' + opts.theme);
@@ -122,6 +115,13 @@ angular.module('ui.ace', [])
122115
acee.renderer.setOption(obj.name, obj.value);
123116
}
124117
}
118+
119+
// onLoad callbacks
120+
angular.forEach(opts.callbacks, function (cb) {
121+
if (angular.isFunction(cb)) {
122+
cb(acee);
123+
}
124+
});
125125
};
126126

127127
return {

0 commit comments

Comments
 (0)