dphfox / Fusion

A modern reactive UI library, built specifically for Roblox and Luau.
https://elttob.uk/Fusion/
MIT License
530 stars 91 forks source link

Fix merge not overwriting values #343

Closed lukadev-0 closed 3 weeks ago

lukadev-0 commented 3 weeks ago

The merge function does not actually overwrite any values when overwrite is not set to "none".

If you call innerScope with a table containing an existing property on the scope, it will not overwrite that property.

local scope = Fusion.scoped({ a = 5 })
local newScope = Fusion.innerScope(scope, { a = 6 })

print(newScope.a) -- 5