@tinymce/tinymce-react
Advanced tools
Comparing version 3.8.0 to 3.8.1
@@ -0,1 +1,4 @@ | ||
## 3.8.1 (2020-10-22) | ||
* Fixed an issue where the component would throw an error when unmounted while loading | ||
## 3.8.0 (2020-10-08) | ||
@@ -2,0 +5,0 @@ * Added types from TinyMCE 5.5 release. |
@@ -72,2 +72,6 @@ "use strict"; | ||
_this.initialise = function () { | ||
var target = _this.elementRef.current; | ||
if (!target) { | ||
return; // Editor has been unmounted | ||
} | ||
var tinymce = TinyMCE_1.getTinymce(); | ||
@@ -77,6 +81,2 @@ if (!tinymce) { | ||
} | ||
var target = _this.elementRef.current; | ||
if (!target) { | ||
throw new Error('Expected target ref'); | ||
} | ||
var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: Utils_1.mergePlugins(_this.props.init && _this.props.init.plugins, _this.props.plugins), toolbar: _this.props.toolbar || (_this.props.init && _this.props.init.toolbar), setup: function (editor) { | ||
@@ -83,0 +83,0 @@ _this.editor = editor; |
@@ -69,2 +69,6 @@ /** | ||
_this.initialise = function () { | ||
var target = _this.elementRef.current; | ||
if (!target) { | ||
return; // Editor has been unmounted | ||
} | ||
var tinymce = getTinymce(); | ||
@@ -74,6 +78,2 @@ if (!tinymce) { | ||
} | ||
var target = _this.elementRef.current; | ||
if (!target) { | ||
throw new Error('Expected target ref'); | ||
} | ||
var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins(_this.props.init && _this.props.init.plugins, _this.props.plugins), toolbar: _this.props.toolbar || (_this.props.init && _this.props.init.toolbar), setup: function (editor) { | ||
@@ -80,0 +80,0 @@ _this.editor = editor; |
{ | ||
"name": "@tinymce/tinymce-react", | ||
"version": "3.8.0", | ||
"version": "3.8.1", | ||
"description": "Official TinyMCE React Component", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97161