-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check if function is available #1554
Conversation
ci:test:relevant |
src/components/main.jsx
Outdated
@@ -229,7 +229,10 @@ class UI extends React.Component { | |||
} | |||
|
|||
if (this._keyDownListener) { | |||
this._keyDownListener.detach(); | |||
if (typeof this._keyDownListener.detach === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this._keyDownListener.detach
possible to be anything other than a function or falsy?
If we just need to check if it exists, we can just do if (this._keyDownListener.detach) {
src/core/uicore.js
Outdated
@@ -153,7 +153,9 @@ if (!CKEDITOR.plugins.get('ae_uicore')) { | |||
editor.on('destroy', _event => { | |||
ariaElement.parentNode.removeChild(ariaElement); | |||
|
|||
handleUI.detach(); | |||
if (typeof handleUI.detach === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
351c32b
to
9d3ac83
Compare
9d3ac83
to
7665e10
Compare
Hello @bryceosterhaus , |
Looks good! btw I have no experience releasing alloy-editor. Let's see if @markocikos knows the next steps, looks like he released last year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fortunatomaldonado LGTM! ✨
@fortunatomaldonado Please see instruction for release in https://github.com/liferay/alloy-editor/wiki/Contributing. The release process here is similar to what we did with CKEditor, but simpler, since there are no patches here. You should be able to make the release. Let me know if you get stuck somewhere, and I'll complete it. |
Hello @markocikos, I am having issues again with the I am on Windows and I think this command doesn't like being ran on Windows, or I might be doing something wrong. I'll see what I can do to resolve this for future times. Can you complete the release? |
@fortunatomaldonado I released v2.14.10 to npm. Please go ahead and update version in DXP. |
https://liferay.atlassian.net/browse/LPP-50808
#1553
After upgrading CKEditor, there are errors when trying to create a blog. This is due to CKEditor no longer providing the detach methods for these two instances.
I added conditions to check if the methods exist to resolve this issue on the upgrade and lower versions.
Let me know if there are any questions or comments about this.
Thank you!