MCPcopy Create free account
hub / github.com/codecombat/codecombat / onFix

Method onFix

app/views/editor/chat/ChatEditView.js:161–175  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

159 }
160
161 onFix (e) {
162 const current = this.treema.get('/context/code/current/javascript')
163 if ((current == null)) {
164 return noty({
165 timeout: 5000,
166 text: 'You need to have current code to fix',
167 type: 'error',
168 layout: 'topCenter'
169 })
170 }
171 this.treema.set('/context/code/fixed', { javascript: current })
172 this.treema.childrenTreemas.context.childrenTreemas.code.open(1)
173 this.treema.childrenTreemas.context.childrenTreemas.code.childrenTreemas.fixed.open()
174 return this.treema.childrenTreemas.context.childrenTreemas.code.childrenTreemas.current.open()
175 }
176
177 onAddCode (e) {
178 const a = this.treema.get('/context/code/current/javascript')

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
setMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected