packages/insomnia-app/app/ui/components/codemirror/code-editor.js
/**
   * Wrapper function to add extra behaviour to our onChange event
   */
Wrapper function to add extra behaviour to our onChange event
Wrapper function to add extra behaviour to our onChange event
_codemirrorValueChanged() {
    if (this._ignoreNextChange || !this.props.onChange) {
      this._ignoreNextChange = false;
      return;
    }
    const value = this.codeMirror.getDoc().getValue();
    const lint = value.length > MAX_SIZE_FOR_LINTING ? false : !this.props.noLint;
    const existingLint = this.codeMirror.options.lint || false;
    if (lint !== existingLint) {
      this.codeMirror.setOption('lint', lint);
    }
    this.props.onChange(value);
  }
_codemirrorValueChanged ( ) { if ( this . _ignoreNextChange || ! this . props . onChange ) { this . _ignoreNextChange = false ; return ; } const value = this . codeMirror . getDoc ( ) . getValue ( ) ; const lint = value . length > MAX_SIZE_FOR_LINTING ? false : ! this . props . noLint ; const existingLint = this . codeMirror . options . lint || false ; if ( lint !== existingLint ) { this . codeMirror . setOption ( 'lint' , lint ) ; } this . props . onChange ( value ) ; }
Wrapper function to add extra behaviour to our onChange event
Wrapper function to add extra behaviour to our onChange event
// Don't trigger change event if we're ignoring changes