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

Merge pull request #3723 from Steve-Mcl/fix-import

Ensure importMap is not null when using import UI
This commit is contained in:
Nick O'Leary 2022-07-01 12:21:37 +01:00 committed by GitHub
commit f5fe4f99f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1664,6 +1664,7 @@ RED.nodes = (function() {
function importNodes(newNodesObj,options) { // createNewIds,createMissingWorkspace) {
const defOpts = { generateIds: false, addFlow: false, reimport: false, importMap: {} }
options = Object.assign({}, defOpts, options)
options.importMap = options.importMap || {}
const createNewIds = options.generateIds;
const reimport = (!createNewIds && !!options.reimport)
const createMissingWorkspace = options.addFlow;