]> source.dussan.org Git - nextcloud-server.git/commitdiff
Not set expiration date is represented as 0
authorMorris Jobke <hey@morrisjobke.de>
Wed, 16 Mar 2016 17:28:45 +0000 (18:28 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 7 Jul 2016 13:10:03 +0000 (15:10 +0200)
apps/files_sharing/js/sharedfilelist.js

index 7b490b3d55740c40b4086e356d7ef9975870d812..3446cb37a875e3d3ec947cc6ad0008f4c9cc1b7e 100644 (file)
 
                        // add row with expiration date for link only shares - influenced by _createRow of filelist
                        if (this._linksOnly) {
-                               var expirationTimestamp = moment(fileData.shares[0].expiration).valueOf();
+                               var expirationTimestamp = 0;
+                               if(fileData.shares[0].expiration !== null) {
+                                       expirationTimestamp = moment(fileData.shares[0].expiration).valueOf();
+                               }
                                $tr.attr('data-expiration', expirationTimestamp);
 
                                // date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)