Skip to content

Commit

Permalink
fix(eslint-plugin-experience): null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Nov 8, 2023
1 parent b20bd75 commit 33f004b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/eslint-plugin-experience/rules/decorator-key-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
schema: [
{
type: `object`,
description: `Decorators names and his keys order`,
description: `Decorators names and their keys order`,
additionalProperties: true,
},
],
Expand All @@ -22,7 +22,8 @@ module.exports = {

for (const decorator of decorators) {
const expression = decorator.expression;
const decoratorName = expression.callee.name;

const decoratorName = expression.callee?.name ?? ``;

if (decoratorName in (ORDER || {})) {
const orderList = ORDER[decoratorName];
Expand Down

0 comments on commit 33f004b

Please sign in to comment.