Skip to content

Commit

Permalink
style: automatic fixes for new ESLint rules
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Locke <[email protected]>
  • Loading branch information
kevinoid committed Nov 2, 2024
1 parent 7e285f8 commit c22b8d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('visit', () => {
assert.fail();
} catch (err) {
assert.strictEqual(err, errTest);
assert(!hasOwnProperty.call(err, 'transformPath'));
assert(!Object.hasOwn(err, 'transformPath'));
assert.deepStrictEqual(transformPath, []);
}
});
Expand Down
2 changes: 1 addition & 1 deletion visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function visit(transformer, method, propName, ...args) {
return method.apply(transformer, args);
} catch (err) {
handlingException = true;
if (err instanceof Error && !hasOwnProperty.call(err, 'transformPath')) {
if (err instanceof Error && !Object.hasOwn(err, 'transformPath')) {
err.transformPath = [...transformer.transformPath];
err.message +=
` (while transforming ${toJsonPointer(err.transformPath)})`;
Expand Down

0 comments on commit c22b8d0

Please sign in to comment.