Skip to content

Commit

Permalink
perf: remove lodash isObject from the linear mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Mhp23 committed Feb 17, 2024
1 parent eaec4e1 commit ecf5800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layout/createRStyle/mapping/linearMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export const linearMapping = <T>(
parentPath: `${parentPath}[${i}]`,
});
}
} else if (_.isObject(currentStyle)) {
} else if (typeof currentStyle === 'object' && currentStyle !== null) {
for (const [property, currentValue] of Object.entries(currentStyle)) {
if (!_.isObject(currentValue)) {
if (typeof currentValue !== 'object' || currentValue === null) {
const parsedVal = parseValue(
currentValue as ValuePattern,
styleConfig
Expand Down

0 comments on commit ecf5800

Please sign in to comment.