Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 3, 2023
1 parent 4acb494 commit d5eda24
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/project-editor/build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ var checkTransformer: (object: IEezObject) => IMessage[] = createTransformer(
let setMessagesTimeoutId: any;

export function backgroundCheck(projectStore: ProjectStore) {
//console.time("backgroundCheck");
console.time("backgroundCheck");

projectStore.outputSectionsStore.setLoading(Section.CHECKS, true);

Expand All @@ -659,5 +659,5 @@ export function backgroundCheck(projectStore: ProjectStore) {
projectStore.outputSectionsStore.setLoading(Section.CHECKS, false);
}, 100);

//console.timeEnd("backgroundCheck");
console.timeEnd("backgroundCheck");
}
20 changes: 16 additions & 4 deletions packages/project-editor/flow/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2074,14 +2074,14 @@ export class Component extends EezObject {
if (projectStore.projectTypeTraits.hasFlowSupport) {
// check properties
for (const propertyInfo of getClassInfo(component).properties) {
if (isPropertyHidden(component, propertyInfo)) {
continue;
}

if (
propertyInfo.type == PropertyType.Array &&
propertyInfo.hasExpressionProperties
) {
if (isPropertyHidden(component, propertyInfo)) {
continue;
}

const value = getProperty(component, propertyInfo.name);

for (const object of value) {
Expand Down Expand Up @@ -4307,6 +4307,10 @@ function checkProperty(
propertyInfo: PropertyInfo
) {
if (isFlowProperty(object, propertyInfo, ["input"])) {
if (isPropertyHidden(component, propertyInfo)) {
return;
}

const value = getProperty(object, propertyInfo.name);
if (value != undefined && value !== "") {
try {
Expand All @@ -4332,6 +4336,10 @@ function checkProperty(
messages.push(propertyNotSetMessage(object, propertyInfo.name));
}
} else if (isFlowProperty(object, propertyInfo, ["assignable"])) {
if (isPropertyHidden(component, propertyInfo)) {
return;
}

const value = getProperty(object, propertyInfo.name);
if (value != undefined && value !== "") {
try {
Expand All @@ -4353,6 +4361,10 @@ function checkProperty(
messages.push(propertyNotSetMessage(object, propertyInfo.name));
}
} else if (isFlowProperty(object, propertyInfo, ["template-literal"])) {
if (isPropertyHidden(component, propertyInfo)) {
return;
}

const value = getProperty(object, propertyInfo.name);
if (value != undefined && value !== "") {
try {
Expand Down
6 changes: 6 additions & 0 deletions packages/project-editor/flow/components/actions/modbus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ export class ModbusActionComponent extends ActionComponent {
client
);
} catch (err) {
console.warn(err);
context.throwError(err.toString());
return;
}
Expand All @@ -289,6 +290,7 @@ export class ModbusActionComponent extends ActionComponent {
context.endAsyncExecution();
},
error => {
console.warn(error);
context.throwError(error.message);
context.endAsyncExecution();
}
Expand Down Expand Up @@ -335,6 +337,7 @@ export class ModbusActionComponent extends ActionComponent {
timeout
);
} catch (err) {
console.warn(err);
context.throwError(err.toString());
return;
}
Expand All @@ -347,6 +350,7 @@ export class ModbusActionComponent extends ActionComponent {
context.endAsyncExecution();
},
error => {
console.warn(error);
context.throwError(error.message);
context.endAsyncExecution();
}
Expand Down Expand Up @@ -392,6 +396,7 @@ export class ModbusActionComponent extends ActionComponent {
timeout
);
} catch (err) {
console.warn(err);
context.throwError(err.toString());
return;
}
Expand All @@ -409,6 +414,7 @@ export class ModbusActionComponent extends ActionComponent {
context.endAsyncExecution();
},
error => {
console.warn(error);
context.throwError(error.message);
context.endAsyncExecution();
}
Expand Down

0 comments on commit d5eda24

Please sign in to comment.