[ACA-986] fix ts error (#68)

* fix ts error

* another fix
This commit is contained in:
Adina Parpalita 2017-11-21 08:26:46 +02:00 committed by Cilibiu Bogdan
parent 892b49046f
commit b189945627

View File

@ -48,12 +48,9 @@ export class NodesApi extends RepoApi {
}
getNodeDescription(name: string): Promise<string> {
let description = 'cm:description';
return this
.getNodeByPath(name)
.then((response: any): string => response.data.entry.properties[description])
.catch(this.handleError);
return this.getNodeByPath(name)
.then(response => response.data.entry.properties['cm:description'])
.catch(() => Promise.resolve(''));
}
deleteNodes(names: string[], relativePath: string = '', permanent: boolean = true): Promise<any> {