From 5b2a1e90ce33aaa688d219f54066d613e6b408a0 Mon Sep 17 00:00:00 2001 From: petersirka Date: Thu, 26 Sep 2024 14:31:01 +0200 Subject: [PATCH] Fixed assigning the `name` field in FlowStream. --- changelog.txt | 1 + flow-flowstream.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/changelog.txt b/changelog.txt index 1452528..dcf73d7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -29,6 +29,7 @@ - improved Markdown parser - added a test functionality for testing Flow components - added `F.extend(prototype, name, fn)` for extending Total.js prototypes +- fixed assigning the `name` field in FlowStream ======================== 0.0.5 diff --git a/flow-flowstream.js b/flow-flowstream.js index 4326940..480ef9c 100644 --- a/flow-flowstream.js +++ b/flow-flowstream.js @@ -1006,6 +1006,7 @@ function init_current(meta, callback, nested) { } } + flow.name = meta.name || meta.id; flow.env = meta.env; flow.origin = meta.origin; flow.proxypath = meta.proxypath || ''; @@ -1607,6 +1608,7 @@ function init_worker(meta, type, callback) { break; case 'stream/save': + worker.$schema.name = msg.data.name; worker.$schema.components = msg.data.components; worker.$schema.design = msg.data.design; worker.$schema.variables = msg.data.variables; @@ -2707,6 +2709,7 @@ function MAKEFLOWSTREAM(meta) { flow.proxy.refreshmeta = function() { + flow.name = flow.$schema.name || flow.$schema.id; flow.origin = flow.$schema.origin; flow.proxypath = flow.$schema.proxypath || '';