Skip to content

Commit 70c5341

Browse files
committed
Fixed custom properties' attributes removing the property namespace (xmlns)
1 parent 0caed21 commit 70c5341

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

lib/server/v2/commands/Propfind.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,14 @@ var default_1 = (function () {
313313
for (var name_1 in properties) {
314314
if (reqBody.mustDisplay(name_1)) {
315315
var tag = prop.ele(name_1);
316+
console.log(name_1, tag);
316317
if (reqBody.mustDisplayValue(name_1)) {
317318
var property = properties[name_1];
318-
tag.attributes = property.attributes;
319+
if (tag.attributes)
320+
for (var attName in property.attributes)
321+
tag.attributes[attName] = property.attributes[attName];
322+
else
323+
tag.attributes = property.attributes;
319324
tag.add(property.value);
320325
}
321326
}

src/server/v2/commands/Propfind.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,16 @@ export default class implements HTTPMethod
472472
if(reqBody.mustDisplay(name))
473473
{
474474
const tag = prop.ele(name);
475+
console.log(name, tag);
475476
if(reqBody.mustDisplayValue(name))
476477
{
477478
const property = properties[name];
478-
tag.attributes = property.attributes;
479+
if(tag.attributes)
480+
for(const attName in property.attributes)
481+
tag.attributes[attName] = property.attributes[attName];
482+
else
483+
tag.attributes = property.attributes;
484+
479485
tag.add(property.value);
480486
}
481487
}

0 commit comments

Comments
 (0)