]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix parsing empty Webdav property nodes
authorVincent Petry <pvince81@owncloud.com>
Tue, 2 Feb 2016 10:52:55 +0000 (11:52 +0100)
committerVincent Petry <pvince81@owncloud.com>
Tue, 2 Feb 2016 17:01:15 +0000 (18:01 +0100)
Return empty string instead of undefined

core/js/oc-backbone-webdav.js
core/vendor/davclient.js/lib/client.js

index d231a5b1ba01bb52aaeb24810421b8ceb32772c6..ba678a32fcf3629a4555060ab7de03feae2310d4 100644 (file)
@@ -92,7 +92,7 @@
 
                        for (var key in propStat.properties) {
                                var propKey = key;
-                               if (davProperties[key]) {
+                               if (key in davProperties) {
                                        propKey = davProperties[key];
                                }
                                props[propKey] = propStat.properties[key];
index dbdfd3823e4ee66d06f7425b13d6f71fae0a5faa..89c11516a388ab26316c9803f120c7fbe9b3b5f1 100644 (file)
@@ -243,7 +243,7 @@ dav.Client.prototype = {
             }
         }
 
-        return content || propNode.textContent || propNode.text;
+        return content || propNode.textContent || propNode.text || '';
     },
 
     /**