mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix the selected value if no config nodes available
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
		| @@ -426,8 +426,13 @@ RED.editor = (function() { | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|         // Set the select value | ||||
|         select.val(nodeValue); | ||||
|         const optionCount = select.find("option").length | ||||
|         if (optionCount === 1) { | ||||
|             // We only have the 'add new...' option | ||||
|             select.val('_ADD_') | ||||
|         } else { | ||||
|             select.val(nodeValue); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user