Skip to content

Fixes #3707#3708

Merged
muxator merged 1 commit intodevelopfrom
fix-toolbar-button-not-existing
Mar 14, 2020
Merged

Fixes #3707#3708
muxator merged 1 commit intodevelopfrom
fix-toolbar-button-not-existing

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

#3707

Also reports the error to the server admin / plugin dev via console.warn.

I can't see any security considerations here but haven't done thorough testing.

Comment thread src/node/utils/toolbar.js

return _.map(this.buttons, function (btn) {
return btn.render();
if(btn) return btn.render();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not needed.

Comment thread src/node/utils/toolbar.js

ButtonsGroup.prototype.render = function () {
if (this.buttons.length == 1) {
if (this.buttons && this.buttons.length == 1) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again maybe not needed but maybe worth having just for some weirdness

@JohnMcLear
Copy link
Copy Markdown
Member Author

Any reason we can't merge @muxator ?

@muxator
Copy link
Copy Markdown
Contributor

muxator commented Mar 14, 2020

Sure we can merge it.

If possible, next time please do a PR from a personal fork, so it can eventually be reworked without interfering with the main repo. Or directly commit to develop if you think there is no need for review. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants