diff --git a/plugin/src/PatchSet.lua b/plugin/src/PatchSet.lua index 7e516972..e1b51e02 100644 --- a/plugin/src/PatchSet.lua +++ b/plugin/src/PatchSet.lua @@ -407,13 +407,28 @@ function PatchSet.removeDataModelName(patchSet, instanceMap) end for i, update in ipairs(patchSet.updated) do - if update.id == dataModelId and update.changedName ~= nil then - update.changedName = nil + if update.id == dataModelId then + -- Remove Name from both changedName and changedProperties + local hadChanges = false + if update.changedName ~= nil then + update.changedName = nil + hadChanges = true + end + if update.changedProperties and update.changedProperties.Name ~= nil then + update.changedProperties.Name = nil + hadChanges = true + end + + if not hadChanges then + return + end + -- Remove update entirely if no other changes remain if - update.changedClassName == nil + update.changedName == nil + and update.changedClassName == nil and update.changedMetadata == nil - and next(update.changedProperties) == nil + and (update.changedProperties == nil or next(update.changedProperties) == nil) then table.remove(patchSet.updated, i) end diff --git a/src/cli/serve.rs b/src/cli/serve.rs index f89e4387..0ec3f95c 100644 --- a/src/cli/serve.rs +++ b/src/cli/serve.rs @@ -19,8 +19,8 @@ const DEFAULT_PORT: u16 = 34872; /// Expose a Rojo project to the Rojo Studio plugin. #[derive(Debug, Parser)] pub struct ServeCommand { - /// Path to the project to serve. Defaults to the current directory. - #[clap(default_value = "")] + /// Path to the project to serve. Defaults to `default.project.json5`. + #[clap(default_value = "default.project.json5")] pub project: PathBuf, /// The IP address to listen on. Defaults to `127.0.0.1`.