diff --git a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs index 5835f3fd280..522f27678e6 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs @@ -628,7 +628,7 @@ internal bool 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 f0f6e4d1c49..3ca828479a6 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);