diff --git a/lib/server/commands/Propfind.js b/lib/server/commands/Propfind.js index ebf2521c..3fb6997f 100644 --- a/lib/server/commands/Propfind.js +++ b/lib/server/commands/Propfind.js @@ -123,7 +123,8 @@ function default_1(arg, callback) { activelock.ele('D:lockscope').ele('D:' + lock.lockKind.scope.value.toLowerCase()); activelock.ele('D:locktype').ele('D:' + lock.lockKind.type.value.toLowerCase()); activelock.ele('D:depth').add('Infinity'); - activelock.ele('D:owner').add(lock.owner); + if (lock.owner) + activelock.ele('D:owner').add(lock.owner); activelock.ele('D:timeout').add('Second-' + (lock.expirationDate - Date.now())); activelock.ele('D:locktoken').ele('D:href').add(lock.uuid); activelock.ele('D:lockroot').ele('D:href').add(arg.fullUri(path_1).replace(' ', '%20')); diff --git a/src/server/commands/Propfind.ts b/src/server/commands/Propfind.ts index f1e70c17..884db364 100644 --- a/src/server/commands/Propfind.ts +++ b/src/server/commands/Propfind.ts @@ -161,7 +161,8 @@ export default function(arg : MethodCallArgs, callback) activelock.ele('D:lockscope').ele('D:' + lock.lockKind.scope.value.toLowerCase()) activelock.ele('D:locktype').ele('D:' + lock.lockKind.type.value.toLowerCase()) activelock.ele('D:depth').add('Infinity') - activelock.ele('D:owner').add(lock.owner) + if(lock.owner) + activelock.ele('D:owner').add(lock.owner) activelock.ele('D:timeout').add('Second-' + (lock.expirationDate - Date.now())) activelock.ele('D:locktoken').ele('D:href').add(lock.uuid) activelock.ele('D:lockroot').ele('D:href').add(arg.fullUri(path).replace(' ', '%20'))