Skip to content

Commit ce83a79

Browse files
author
Akos Kitta
committed
fix: bogus type guard
1 parent 12a3d69 commit ce83a79

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arduino-ide-extension/src/common/protocol/boards-service.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,13 @@ export interface BoardIdentifier {
644644

645645
export function isBoardIdentifier(arg: unknown): arg is BoardIdentifier {
646646
return (
647-
(Boolean(arg) &&
648-
typeof arg === 'object' &&
649-
(<BoardIdentifier>arg).name !== undefined &&
650-
typeof (<BoardIdentifier>arg).name === 'string' &&
651-
(<BoardIdentifier>arg).fqbn === undefined) ||
652-
((<BoardIdentifier>arg).fqbn !== undefined &&
653-
typeof (<BoardIdentifier>arg).fqbn === 'string')
647+
Boolean(arg) &&
648+
typeof arg === 'object' &&
649+
(<BoardIdentifier>arg).name !== undefined &&
650+
typeof (<BoardIdentifier>arg).name === 'string' &&
651+
((<BoardIdentifier>arg).fqbn === undefined ||
652+
((<BoardIdentifier>arg).fqbn !== undefined &&
653+
typeof (<BoardIdentifier>arg).fqbn === 'string'))
654654
);
655655
}
656656

0 commit comments

Comments
 (0)