Skip to content

Commit 50029ec

Browse files
Apply @typescript-eslint/prefer-optional-chain
1 parent 51356cb commit 50029ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/roslib/src/urdf/UrdfJoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class UrdfJoint {
5959
const axis = xml.getElementsByTagName(UrdfAttrs.Axis);
6060
if (axis[0]) {
6161
const xyzValue = axis[0].getAttribute(UrdfAttrs.Xyz)?.split(" ");
62-
if (!xyzValue || xyzValue.length !== 3) {
62+
if (!xyzValue?.length !== 3) {
6363
throw new Error(
6464
"If specified, axis must have an xyz value composed of three numbers",
6565
);

0 commit comments

Comments
 (0)