1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3714 from kazuhitoyokoi/master-fixdefaulticonbutton

Fix use default button for node icon
This commit is contained in:
Nick O'Leary 2022-06-27 20:36:05 +01:00 committed by GitHub
commit 4467c0df31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,7 @@
if (!node._def.defaults || !node._def.defaults.hasOwnProperty("icon")) { if (!node._def.defaults || !node._def.defaults.hasOwnProperty("icon")) {
var icon = $("#red-ui-editor-node-icon").val()||""; var icon = $("#red-ui-editor-node-icon").val()||"";
if (!this.isDefaultIcon) { if (!this.isDefaultIcon) {
if ((icon !== node.icon) && if ((node.icon && icon !== node.icon) || (!node.icon && icon !== "")) {
(icon !== "")) {
editState.changes.icon = node.icon; editState.changes.icon = node.icon;
node.icon = icon; node.icon = icon;
editState.changed = true; editState.changed = true;