check if onListeners are set

pull/1487/head
yann300 3 years ago
parent c14483081e
commit d041cfa759
  1. 10
      apps/debugger/src/app/debugger-api.ts

@ -119,17 +119,17 @@ export const DebuggerApiMixin = (Base) => class extends Base {
debug (hash) {
this.debugHash = hash
this.onDebugRequestedListener(hash)
if (this.onDebugRequestedListener) this.onDebugRequestedListener(hash)
}
onActivation () {
this.on('editor', 'breakpointCleared', (fileName, row) => this.onBreakpointClearedListener(fileName, row))
this.on('editor', 'breakpointAdded', (fileName, row) => this.onBreakpointAddedListener(fileName, row))
this.on('editor', 'contentChanged', () => this.onEditorContentChangedListener())
this.on('editor', 'breakpointCleared', (fileName, row) => { if (this.onBreakpointClearedListener) this.onBreakpointClearedListener(fileName, row) })
this.on('editor', 'breakpointAdded', (fileName, row) => { if (this.onBreakpointAddedListener) this.onBreakpointAddedListener(fileName, row) })
this.on('editor', 'contentChanged', () => { if (this.onEditorContentChangedListener) this.onEditorContentChangedListener() })
}
onDeactivation () {
this.onRemoveHighlightsListener()
if (this.onRemoveHighlightsListener) this.onRemoveHighlightsListener()
this.off('editor', 'breakpointCleared')
this.off('editor', 'breakpointAdded')
this.off('editor', 'contentChanged')

Loading…
Cancel
Save