Revision: 28987 http://sourceforge.net/p/bibdesk/svn/28987 Author: hofman Date: 2025-02-06 15:46:20 +0000 (Thu, 06 Feb 2025) Log Message: ----------- no need to set returnPubs when doing nothing
Modified Paths: -------------- trunk/bibdesk/BibDocument+Scripting.m Modified: trunk/bibdesk/BibDocument+Scripting.m =================================================================== --- trunk/bibdesk/BibDocument+Scripting.m 2025-02-06 15:42:20 UTC (rev 28986) +++ trunk/bibdesk/BibDocument+Scripting.m 2025-02-06 15:46:20 UTC (rev 28987) @@ -1137,20 +1137,16 @@ [mergeController beginSheetModalForWindow:documentWindow completionHandler:^(NSModalResponse rv){ if (rv == NSModalResponseOK) returnPubs = @[mergePub]; - else - returnPubs = @[]; if (suspended) - [command resumeExecutionWithResult:returnPubs]; + [command resumeExecutionWithResult:returnPubs ?: @[]]; finished = YES; }]; return; } returnPubs = @[mergePub]; - } else { - returnPubs = @[]; } if (suspended) - [command resumeExecutionWithResult:returnPubs]; + [command resumeExecutionWithResult:returnPubs ?: @[]]; finished = YES; }; } else { @@ -1167,9 +1163,9 @@ } [self importPublications:result publicationsToAutoFile:([url isFileURL] ? result : nil) options:BDSKImportAggregate | BDSKImportNoEdit]; } - returnPubs = result ?: @[]; + returnPubs = result; if (suspended) - [command resumeExecutionWithResult:returnPubs]; + [command resumeExecutionWithResult:result ?: @[]]; finished = YES; }; } @@ -1195,7 +1191,6 @@ } else if (url) { handler(@[[BibItem itemWithURL:url title:nil owner:self]]); } else { - returnPubs = @[]; finished = YES; } @@ -1202,7 +1197,7 @@ if (synchronous == NO) { return nil; } else if (finished) { - return returnPubs; + return returnPubs ?: @[]; } else { [command suspendExecution]; suspended = YES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit