hot patch
This commit is contained in:
@@ -8,17 +8,19 @@ class CascadeController {
|
||||
}
|
||||
|
||||
initialise(onCodeChange, code) {
|
||||
const onInit = () => {
|
||||
const editor = getEditor()
|
||||
editor.setValue(code)
|
||||
editor.evaluateCode(false)
|
||||
}
|
||||
// only inits on first call, after that it just updates the editor and revaluates code, maybe should rename?
|
||||
this.incomingOnCodeChang = onCodeChange
|
||||
if (!this._hasInitialised) {
|
||||
initialize(this.controllerOnCodeChange, code)
|
||||
initialize(this.controllerOnCodeChange, code, onInit)
|
||||
this._hasInitialised = true
|
||||
return
|
||||
}
|
||||
const editor = getEditor()
|
||||
editor.setValue(code)
|
||||
editor.evaluateCode(false)
|
||||
return this.domNode
|
||||
onInit()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user