Skip to content

Commit

Permalink
fix: update for loop in styled-system
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Oct 19, 2020
1 parent e68d8aa commit 6f003af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"operator-assignment": "off",
"prefer-destructuring": "off",
"react/state-in-constructor": "off",
"no-continue": "off",
"react/destructuring-assignment": "off",
"@typescript-eslint/dot-notation": "off",
"no-bitwise": "off",
Expand Down
4 changes: 2 additions & 2 deletions packages/styled-system/src/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ const responsive = (styles: any) => (theme: Dict) => {

if (!media) {
computedStyles[key] = value[index]
return
continue
}

computedStyles[media] = computedStyles[media] || {}

if (value[index] == null) {
return
continue
}

computedStyles[media][key] = value[index]
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-system/tests/interpolation.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from "../src"
import { createBreakpoints } from "@chakra-ui/theme-tools"
import { css } from "../src"

test("should handle array interpolations", () => {
const customBreakpoints = createBreakpoints({
Expand Down

0 comments on commit 6f003af

Please sign in to comment.