on master help sign in
Do "instanceof Array" test with generated code
8eace70Evan Czaplicki
compiler/Generate/JavaScript.hs−1
@@ -34,7 +34,6 @@ internalImports name =
34 [ varDecl "_N" (obj ["Elm","Native"])
34 [ varDecl "_N" (obj ["Elm","Native"])
35 , include "_U" "Utils"
35 , include "_U" "Utils"
36 , include "_L" "List"
36 , include "_L" "List"
37− , include "_A" "Array"
38 , include "_E" "Error"
37 , include "_E" "Error"
39 , varDecl Help.localModuleName (string (Module.nameToString name))
38 , varDecl Help.localModuleName (string (Module.nameToString name))
40 ]
39 ]
compiler/Generate/JavaScript/Ports.hs+1−1
@@ -21,7 +21,7 @@ check x jsType continue =
21 JSNumber -> [typeof "number"]
21 JSNumber -> [typeof "number"]
22 JSBoolean -> [typeof "boolean"]
22 JSBoolean -> [typeof "boolean"]
23 JSString -> [typeof "string", instanceof "String"]
23 JSString -> [typeof "string", instanceof "String"]
24− JSArray -> [(obj ["_U","isJSArray"] <|)]
24+ JSArray -> [instanceof "Array"]
25 JSObject fields -> [jsFold OpLAnd (typeof "object" : map member fields)]
25 JSObject fields -> [jsFold OpLAnd (typeof "object" : map member fields)]
26
26
27incoming :: CanonicalType -> Expression ()
27incoming :: CanonicalType -> Expression ()