You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an older version of CodeFlask, onUpdate would run on the initial update to the textarea. It's still making the call to runUpdate, but the initial function scope is wrong so the callback never runs on page load.
If you log this in runUpdate on page load it points to window...where Codeflask won't find this.updateCallBack later on. Once you type in the textarea, the scope is set to the appropriate object.
In an older version of CodeFlask,
onUpdate
would run on the initial update to the textarea. It's still making the call torunUpdate
, but the initial function scope is wrong so the callback never runs on page load.If you log
this
inrunUpdate
on page load it points towindow
...where Codeflask won't findthis.updateCallBack
later on. Once you type in the textarea, the scope is set to the appropriate object.This is the part of the code that is wrong: https://github.com/kazzkiq/CodeFlask/blob/master/src/codeflask.js#L295
Fix: Change onUpdate to bind the correct scope
The text was updated successfully, but these errors were encountered: