@@ -354,14 +354,16 @@ dynamicAttributesToModifyAttributes = dynamicAttributesToModifyAttributesWithIni
354354dynamicAttributesToModifyAttributesWithInitial :: (Ord k, PostBuild t m) => Map k Text -> Dynamic t (Map k Text) -> m (Event t (Map k (Maybe Text)))
355355dynamicAttributesToModifyAttributesWithInitial attrs0 d = do
356356 postBuild <- getPostBuild
357− let modificationsNeeded = flip pushAlways (align postBuild $ updated d) $ \case
358− This () -> do
359− new <- sample $ current d
360− return $ diffMap attrs0 new
361− These () new -> return $ diffMap attrs0 new
362− That new -> do
363− old <- sample $ current d
364− return $ diffMap old new
357+ let modificationsNeeded = flip push (align postBuild $ updated d) $ \x -> do
358+ p <- case x of
359+ This () -> do
360+ new <- sample $ current d
361+ return $ diffMap attrs0 new
362+ These () new -> return $ diffMap attrs0 new
363+ That new -> do
364+ old <- sample $ current d
365+ return $ diffMap old new
366+ return $ if Map.null p then Nothing else Just p
365367 return modificationsNeeded
366368
367369--------------------------------------------------------------------------------