handle case where copy editor is closed without copies being saved
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jun 2006 06:10:50 +0000 (06:10 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jun 2006 06:10:50 +0000 (06:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4782 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js

index 034fe4c..dcea458 100644 (file)
@@ -362,6 +362,10 @@ g.stash_and_close = function() {
                        /* FIXME -- need to unique the temp space, and not rely on modalness of window */
                        g.data.stash_retrieve();
                        copies = JSON2js( g.data.temp_copies );
+                       if (!copies) {
+                               alert('Items were not created.');
+                               return;
+                       }
                }
 
                for (var i = 0; i < copies.length; i++) {