diff --git a/lib/server/v2/commands/Propfind.js b/lib/server/v2/commands/Propfind.js index 19b5fc8e..1d823c08 100644 --- a/lib/server/v2/commands/Propfind.js +++ b/lib/server/v2/commands/Propfind.js @@ -313,9 +313,14 @@ var default_1 = (function () { for (var name_1 in properties) { if (reqBody.mustDisplay(name_1)) { var tag = prop.ele(name_1); + console.log(name_1, tag); if (reqBody.mustDisplayValue(name_1)) { var property = properties[name_1]; - tag.attributes = property.attributes; + if (tag.attributes) + for (var attName in property.attributes) + tag.attributes[attName] = property.attributes[attName]; + else + tag.attributes = property.attributes; tag.add(property.value); } } diff --git a/src/server/v2/commands/Propfind.ts b/src/server/v2/commands/Propfind.ts index 6ade4a9b..9bcc2545 100644 --- a/src/server/v2/commands/Propfind.ts +++ b/src/server/v2/commands/Propfind.ts @@ -472,10 +472,16 @@ export default class implements HTTPMethod if(reqBody.mustDisplay(name)) { const tag = prop.ele(name); + console.log(name, tag); if(reqBody.mustDisplayValue(name)) { const property = properties[name]; - tag.attributes = property.attributes; + if(tag.attributes) + for(const attName in property.attributes) + tag.attributes[attName] = property.attributes[attName]; + else + tag.attributes = property.attributes; + tag.add(property.value); } }