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

Fix use default button for node icon (Backport node-red#3714 to v2.x)

This commit is contained in:
Kazuhito Yokoi 2022-07-04 21:35:44 +09:00
parent a7375e4e8f
commit 48e33a472b

View File

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