We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac9fc6 commit 070a5d5Copy full SHA for 070a5d5
src/Data/Foreign.purs
@@ -50,9 +50,10 @@ foreign import readMaybeImpl
50
readMaybeImpl' :: Foreign -> Maybe Foreign
51
readMaybeImpl' = runFn3 readMaybeImpl Nothing Just
52
53
+-- We use == to check for both null and undefined
54
foreign import readPropImpl
55
"function readPropImpl(k, obj) { \
- \ return obj === undefined ? undefined : obj[k];\
56
+ \ return obj == undefined ? undefined : obj[k];\
57
\}" :: forall a. Fn2 String Foreign Foreign
58
59
readPropImpl' :: String -> Foreign -> Foreign
0 commit comments