Browse Source

Ensure editors are closable even if coming from links

dev/git-series/gccdum
Matt Godbolt 6 years ago
parent
commit
fde6c27f59
  1. 4
      static/hub.js

4
static/hub.js

@ -101,6 +101,10 @@ define(function (require) {
};
Hub.prototype.codeEditorFactory = function (container, state) {
// Ensure editors are closable: some older versions had 'isClosable' false.
// NB there doesn't seem to be a better way to do this than reach into the config and rely on the fact nothing
// has used it yet.
container.parent.config.isClosable = true;
return new editor.Editor(this, state, container, options.language, this.defaultSrc);
};

Loading…
Cancel
Save