Skip to content

Commit

Permalink
fix: Fix render monaco editor in vuetify dialogs (popups) (#154)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey <a.ryzhenkov@qiwi.com>
  • Loading branch information
andron58 and Andrey committed Jan 13, 2021
1 parent a8eed0d commit cc29b34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MonacoEditor.js
Expand Up @@ -75,14 +75,18 @@ export default {
if (this.amdRequire) {
this.amdRequire(['vs/editor/editor.main'], () => {
this.monaco = window.monaco
this.initMonaco(window.monaco)
this.$nextTick(() => {
this.initMonaco(window.monaco)
})
})
} else {
// ESM format so it can't be resolved by commonjs `require` in eslint
// eslint-disable-next-line import/no-unresolved
const monaco = require('monaco-editor')
this.monaco = monaco
this.initMonaco(monaco)
this.$nextTick(() => {
this.initMonaco(monaco)
})
}
},

Expand Down

0 comments on commit cc29b34

Please sign in to comment.