Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk committed Oct 29, 2024
1 parent f65132c commit 490e808
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/mui-system/src/style/style.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import capitalize from '@mui/utils/capitalize';
import type { CSSObject } from '@mui/styled-engine';
import responsivePropType from '../responsivePropType';
import { handleBreakpoints } from '../breakpoints';
import type { CSSObject } from '@mui/styled-engine';
import type { StyleFunction } from '../Box';

export type TransformFunction = (
Expand Down Expand Up @@ -44,15 +44,15 @@ export function getPath<T extends Record<string, any> | undefined | null>(

function getPathImpl(object: any, path: string[]) {
let result = object;
let counter = 0;
let index = 0;

while (counter < path.length) {
while (index < path.length) {
if (result === null || result === undefined) {
return result;
}

result = result[path[counter]];
counter++;
result = result[path[index]];
index += 1;
}

return result;
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-system/src/styleFunctionSx/styleFunctionSx.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function unstable_createStyleFunctionSx() {

const css = emptyBreakpoints;

for (let styleKey in sxObject) {
for (const styleKey in sxObject) {
const value = callIfFn(sxObject[styleKey], theme);
if (value === null || value === undefined) {
continue;
Expand Down Expand Up @@ -161,7 +161,7 @@ styleFunctionSx.filterProps = ['sx'];
export default styleFunctionSx;

function assign(target, item) {
for (let key in item) {
for (const key in item) {
target[key] = item[key];
}
return target;
Expand Down

0 comments on commit 490e808

Please sign in to comment.