From cd51c81dd499f6b7abb186da54ea59de5cb19122 Mon Sep 17 00:00:00 2001 From: Kade Date: Fri, 17 Oct 2025 16:42:22 -0600 Subject: [PATCH] Fixed linting errors --- src/urdf/UrdfBox.ts | 2 +- src/urdf/UrdfColor.ts | 2 +- src/urdf/UrdfMesh.ts | 2 +- src/urdf/UrdfUtils.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/urdf/UrdfBox.ts b/src/urdf/UrdfBox.ts index 05167e714..541ee0f8d 100644 --- a/src/urdf/UrdfBox.ts +++ b/src/urdf/UrdfBox.ts @@ -20,7 +20,7 @@ export default class UrdfBox { // Parse the xml string const size: Optional = xml.getAttribute(UrdfAttrs.Size)?.split(' '); - if (!size || size.length !== 3) { + if (size?.length !== 3) { return; } diff --git a/src/urdf/UrdfColor.ts b/src/urdf/UrdfColor.ts index 850171e4c..b1d34f405 100644 --- a/src/urdf/UrdfColor.ts +++ b/src/urdf/UrdfColor.ts @@ -32,7 +32,7 @@ export default class UrdfColor { constructor({ xml }: UrdfDefaultOptions) { // Parse the xml string const rgba: Optional = xml.getAttribute(UrdfAttrs.Rgba)?.split(' '); - if (!rgba || rgba.length !== 4) { + if (rgba?.length !== 4) { return; } diff --git a/src/urdf/UrdfMesh.ts b/src/urdf/UrdfMesh.ts index 26f9fdba5..f2d832fe9 100644 --- a/src/urdf/UrdfMesh.ts +++ b/src/urdf/UrdfMesh.ts @@ -26,7 +26,7 @@ export default class UrdfMesh { // Check for a scale const scale: Optional = xml.getAttribute(UrdfAttrs.Scale)?.split(' '); - if (!scale || scale.length !== 3) { + if (scale?.length !== 3) { return; } diff --git a/src/urdf/UrdfUtils.ts b/src/urdf/UrdfUtils.ts index da52493da..48b04a650 100644 --- a/src/urdf/UrdfUtils.ts +++ b/src/urdf/UrdfUtils.ts @@ -7,7 +7,7 @@ export function parseUrdfOrigin(originElement: Element): Pose { // Check the XYZ const xyz: string[] | undefined = originElement.getAttribute(UrdfAttrs.Xyz)?.split(' '); let position: Vector3 = new Vector3(); - if (xyz && xyz.length === 3) { + if (xyz?.length === 3) { position = new Vector3({ x: parseFloat(xyz[0]), y: parseFloat(xyz[1]), @@ -18,7 +18,7 @@ export function parseUrdfOrigin(originElement: Element): Pose { // Check the RPY const rpy = originElement.getAttribute(UrdfAttrs.Rpy)?.split(' '); let orientation = new Quaternion(); - if (rpy && rpy.length === 3) { + if (rpy?.length === 3) { // Convert from RPY const roll = parseFloat(rpy[0]); const pitch = parseFloat(rpy[1]);