Fix preview rendering bug

This commit is contained in:
Sauli Anto
2019-10-04 20:01:28 +03:00
parent 1527c7c9eb
commit 070f84ebd6
4 changed files with 25 additions and 23 deletions

View File

@@ -105,9 +105,10 @@ export default class MathUI extends Plugin {
// Show preview element
const elId = 'math-preview';
let prewviewEl = document.getElementById( elId );// eslint-disable-line
if ( prewviewEl ) {
prewviewEl.style.display = 'block';
let prewviewEl = document.getElementById( elId ); // eslint-disable-line
if ( prewviewEl && this._form.previewEnabled ) {
// Force refresh preview
this._form.mathView.updateMath();
}
this._form.equation = mathCommand.value || '';