@@ -202,7 +202,7 @@ listWithKey' = listWithKeyShallowDiff
202202listWithKeyShallowDiff :: (Ord k, MonadWidget t m) => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a))
203203listWithKeyShallowDiff initialVals valsChanged mkChild = do
204204 let childValChangedSelector = fanMap $ fmap (Map.mapMaybe id) valsChanged
205− sentVals <- foldDyn (flip applyMap) Map.empty $ fmap (fmap (fmap (\_ -> ()))) valsChanged
205+ sentVals <- foldDyn (flip applyMap) (() <$ initialVals) $ fmap (fmap (fmap (\_ -> ()))) valsChanged
206206 let relevantDiff diff _ = case diff of
207207 Nothing -> Just Nothing -- Even if we let a Nothing through when the element doesn't already exist, this doesn't cause a problem because it is ignored
208208 Just _ -> Nothing -- We don't want to let spurious re-creations of items through