on develop help sign in
Don't attempt to add child node to dyn when placeholder parent can't be found
commitc6ee1e76a635ef30077247664557a1729bae535d authorAli Abrar <aliabrar@gmail.com> dateSun 16 Aug 2015, 01:39 (11 years ago) parenta847517
1 file changed+2−2
src/Reflex/Dom/Widget/Basic.hs+2−2
src/Reflex/Dom/Widget/Basic.hs+2−2
@@ -122,8 +122,8 @@ dyn child = do
122122 (result, postBuild, voidActions) <- runWidget df c
123123 scheduleFollowup newChildBuiltTriggerRef (result, voidActions)
124124 postBuild
125− Just p <- liftIO $ nodeGetParentNode endPlaceholder
126− _ <- liftIO $ nodeInsertBefore p (Just df) (Just endPlaceholder)
125+ mp <- liftIO $ nodeGetParentNode endPlaceholder
126+ forM_ mp $ \p -> liftIO $ nodeInsertBefore p (Just df) (Just endPlaceholder)
127127 return ()
128128 schedulePostBuild $ do
129129 c <- sample $ current child