diff --git a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs index 2f83b7d9157..484950f3a8f 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs @@ -628,7 +628,7 @@ internal void Save(string filePath, bool isBackup = false, EngineController engi { // For intentional SaveAs either through UI or API calls, replace workspace elements' Guids and workspace Id jo["Uuid"] = Guid.NewGuid().ToString(); - if (jo["Bindings"] != JToken.Parse("[]")) + if (jo["Bindings"] != null && jo["Bindings"].Any()) { jo["Bindings"] = JToken.Parse("[]"); diff --git a/test/DynamoCoreWpfTests/DynamoViewTests.cs b/test/DynamoCoreWpfTests/DynamoViewTests.cs index 298cf4a8558..0de1fcf4698 100644 --- a/test/DynamoCoreWpfTests/DynamoViewTests.cs +++ b/test/DynamoCoreWpfTests/DynamoViewTests.cs @@ -170,7 +170,8 @@ public void ElementBinding_SaveAs() File.Delete(filePath); File.Delete(saveAsPath); } - + + [Test] public void TestToastNotificationClosingBehavior() { var preferencesWindow = new PreferencesView(View);