PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: styled-system/styled-system (js)
Issue: First option in sizes array not returning properly
After upgrading to v5 and converting the `maxWidths` array in my theme.js to `sizes`, I have: 

`sizes: ['80em', '52em', '40em', '30em']`

The expected result from `<Box maxWidth={0}>` would be `max-width: 80em`, however `max-width: 0` is returned.

Conversely, `<Box maxWidth={1}>` returns `max-width: 52em` as expected.
Pull request description: Fix get utility
Fixes #529

Patch:
diff --git a/packages/core/src/index.js b/packages/core/src/index.js
index 4ec6c2e..1121fe1 100644
--- a/packages/core/src/index.js
+++ b/packages/core/src/index.js
@@ -15,7 +15,7 @@ const defaults = {
   breakpoints: [40, 52, 64].map(n => n + 'em'),
 }
 const createMediaQuery = n => `@media screen and (min-width: ${n})`
-const getValue = (n, scale) => n ? get(scale, n, n) : n
+const getValue = (n, scale) => get(scale, n, n)
 
 export const get = (obj, key, def, p, undef) => {
   key = key && key.split ? key.split('.') : [key]
diff --git a/packages/styled-system/src/index.js b/packages/styled-system/src/index.js
index 903049a..1da9341 100644
--- a/packages/styled-system/src/index.js
+++ b/packages/styled-system/src/index.js
@@ -18,7 +18,6 @@ export { background } from '@styled-system/background'
 export { position } from '@styled-system/position'
 export { grid } from '@styled-system/grid'
 export { shadow } from '@styled-system/shadow'
-export { default as boxShadow, default as textShadow } from '@styled-system/shadow'
 
 export {
   variant,


Test patch:
diff --git a/packages/core/test/get.js b/packages/core/test/get.js
index 37a2851..c34a67c 100644
--- a/packages/core/test/get.js
+++ b/packages/core/test/get.js
@@ -27,7 +27,12 @@ test('handles undefined values', () => {
   expect(a).toBe(undefined)
 })
 
-test.skip('handles null values', () => {
+test('handles null values', () => {
   const a = get({}, null)
   expect(a).toBe(undefined)
 })
+
+test('returns 0 index items', () => {
+  const a = get([ 'a', 'b', 'c' ], 0)
+  expect(a).toBe('a')
+})
diff --git a/packages/core/test/system.js b/packages/core/test/system.js
index 0de1886..d498985 100644
--- a/packages/core/test/system.js
+++ b/packages/core/test/system.js
@@ -135,6 +135,22 @@ test('gets values from theme', () => {
   })
 })
 
+test('gets 0 index values from theme', () => {
+  const parser = system({
+    width: {
+      property: 'width',
+      scale: 'sizes',
+    }
+  })
+  const style = parser({
+    theme: {
+      sizes: [ 24, 48 ],
+    },
+    width: 0,
+  })
+  expect(style).toEqual({ width: 24 })
+})
+
 test('ignores null values', () => {
   const parser = system({
     color: true,
diff --git a/packages/layout/test/index.js b/packages/layout/test/index.js
index 643dae1..d892bb7 100644
--- a/packages/layout/test/index.js
+++ b/packages/layout/test/index.js
@@ -18,3 +18,17 @@ test('returns layout styles', () => {
     },
   })
 })
+
+test('returns 0 from theme.sizes', () => {
+  const style = layout({
+    theme: {
+      sizes: [ 24, 48, 96 ],
+    },
+    width: 0,
+    height: 0,
+  })
+  expect(style).toEqual({
+    width: 24,
+    height: 24,
+  })
+})