Skip to content

Commit

Permalink
Improved error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Nov 7, 2024
1 parent 1c9c2cf commit 22f7a7f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions flow-flowstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ function init_current(meta, callback, nested) {

if (instance) {
if (typeof(instance) === 'string') {
if (source === 'add') {
if (source === 'add' || source === 'register') {
componentid = instance;
F.error(err, 'FlowStream | register component | ' + instance);
} else if (meta.design[instance]) {
Expand All @@ -1339,9 +1339,6 @@ function init_current(meta, callback, nested) {
} else if (source === 'instance_make') {
instanceid = instance.id;
componentid = instance.component;
} else if (source === 'register') {
instanceid = '';
componentid = instance;
} else {
instanceid = instance.id;
componentid = instance.module.id;
Expand Down Expand Up @@ -1449,9 +1446,11 @@ function init_current(meta, callback, nested) {
} else if (source === 'register') {
instanceid = '';
componentid = instance;
} else if (source === 'add') {
componentid = instance;
} else {
instanceid = instance.id;
componentid = instance.module.id;
componentid = instance.module ? instance.module.id : null;
}
}

Expand Down

0 comments on commit 22f7a7f

Please sign in to comment.