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

Method destroy

app/views/editor/level/LevelEditView.js:156–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 }
155
156 destroy () {
157 // Currently only check presence on the level.
158 // TODO: Should this system also handle other models with local backups: 'LevelComponent', 'LevelSystem', 'ThangType'
159 if ((!this.level.hasLocalChanges()) && me.isAdmin()) {
160 presenceApi.deletePresence({ levelOriginalId: this.level.get('original') })
161 }
162
163 clearInterval(this.timerIntervalID)
164 clearInterval(this.checkPresenceIntervalID)
165 return super.destroy()
166 }
167
168 async onAITranslate () {
169 this.openModalView(new AITranslateConfirmModal(this.level))

Callers 1

pushChangesToPreviewMethod · 0.45

Calls 3

hasLocalChangesMethod · 0.80
isAdminMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected