Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays contained in a media query won't be parsed #14

Closed
RonaldTreur opened this issue Aug 26, 2014 · 1 comment
Closed

Arrays contained in a media query won't be parsed #14

RonaldTreur opened this issue Aug 26, 2014 · 1 comment
Assignees

Comments

@RonaldTreur
Copy link
Owner

As mentioned by @jvandijk in #10 (comment), arrays aren't parsed correctly when inside a media query:

Window {
    orientation-modes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT];
    @media ios {
        extendEdges: [Ti.UI.EXTEND_EDGE_ALL];
    }
}

you'll get the following error:

STSS/lib/renderer/css2json.js:134
            v = special['array'][arrayNr][valueNr][0];
                                ^
TypeError: Cannot read property '2' of undefined
    at STSS/lib/renderer/css2json.js:134:24
    at String.replace (native)
    at parseSpecialValue (STSS/lib/renderer/css2json.js:132:15)
    at parseDeclaration (STSS/lib/renderer/css2json.js:187:11)
    at STSS/lib/renderer/css2json.js:335:14
    at Array.forEach (native)
    at parseNormalRule (STSS/lib/renderer/css2json.js:330:20)
    at STSS/lib/renderer/css2json.js:398:4
    at Array.forEach (native)
    at parseAST (STSS/lib/renderer/css2json.js:396:8)
@jvandijk
Copy link
Contributor

@RonaldTreur tested and confirmed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants