Closed 43081j closed 9 years ago
Your recent commits merged a PR in which added a $timeout call here: https://github.com/angular-ui/ui-codemirror/blob/master/src/ui-codemirror.js#L143
$timeout
I find when this gets called, there are cases where this is undefined somehow, in codemirror.refresh.
this
codemirror.refresh
This seems to be fixed easily by passing a function:
$timeout(function() { codeMirror.refresh(); });
I am unsure why this happens, but it completely breaks in my case when calling $apply shortly after initialisation.
$apply
Your recent commits merged a PR in which added a
$timeout
call here: https://github.com/angular-ui/ui-codemirror/blob/master/src/ui-codemirror.js#L143I find when this gets called, there are cases where
this
is undefined somehow, incodemirror.refresh
.This seems to be fixed easily by passing a function:
I am unsure why this happens, but it completely breaks in my case when calling
$apply
shortly after initialisation.