Skip to content

Commit bb85094

Browse files
committed
Fixed editor code that was using moduleName.
1 parent 057465b commit bb85094

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/editor/editor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ export class Editor {
382382
public getMechanism(mechanismInRobot: commonStorage.MechanismInRobot): commonStorage.Mechanism | null {
383383
if (this.currentProject) {
384384
for (const mechanism of this.currentProject.mechanisms) {
385-
if (mechanism.moduleName + '.' + mechanism.className === mechanismInRobot.className) {
385+
const fullClassName = commonStorage.pascalCaseToSnakeCase(mechanism.className) + '.' + mechanism.className;
386+
if (fullClassName === mechanismInRobot.className) {
386387
return mechanism;
387388
}
388389
}

0 commit comments

Comments
 (0)