#9 Unit tests

This commit is contained in:
Denys Vuika
2016-05-09 14:40:01 +01:00
parent 2f30ae687b
commit c5b2bc812c
19 changed files with 252 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ export class DocumentActionsService {
getHandler(key: string): ContentActionHandler {
if (key) {
let lkey = key.toLowerCase();
return this.handlers[lkey];
return this.handlers[lkey] || null;
}
return null;
}
@@ -59,7 +59,7 @@ export class DocumentActionsService {
}
private download(obj: any) {
if (obj && !obj.isFolder) {
if (this._alfrescoService && obj && !obj.isFolder) {
let link = document.createElement('a');
document.body.appendChild(link);
link.setAttribute('download', 'download');