mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Fix Rojo breaking when users undo/redo in Studio (#708)
This commit is contained in:
parent
658d211779
commit
ce530e795a
3 changed files with 104 additions and 11 deletions
|
|
@ -5,6 +5,8 @@
|
|||
Patches can come from the server or be generated by the client.
|
||||
]]
|
||||
|
||||
local ChangeHistoryService = game:GetService("ChangeHistoryService")
|
||||
|
||||
local Packages = script.Parent.Parent.Parent.Packages
|
||||
local Log = require(Packages.Log)
|
||||
|
||||
|
|
@ -17,6 +19,8 @@ local reify = require(script.Parent.reify)
|
|||
local setProperty = require(script.Parent.setProperty)
|
||||
|
||||
local function applyPatch(instanceMap, patch)
|
||||
local patchTimestamp = DateTime.now():FormatLocalTime("LTS", "en-us")
|
||||
|
||||
-- Tracks any portions of the patch that could not be applied to the DOM.
|
||||
local unappliedPatch = PatchSet.newEmpty()
|
||||
|
||||
|
|
@ -199,6 +203,8 @@ local function applyPatch(instanceMap, patch)
|
|||
end
|
||||
end
|
||||
|
||||
ChangeHistoryService:SetWaypoint("Rojo: Patch " .. patchTimestamp)
|
||||
|
||||
return unappliedPatch
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue