Skip to content

Commit

Permalink
Merge pull request bleenco#380 from retailify/master
Browse files Browse the repository at this point in the history
refactoring
  • Loading branch information
retailify authored Nov 12, 2017
2 parents ecb9959 + 875b4b0 commit ee0fc06
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ngx-uploader/classes/ngx-uploader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,14 @@ export class NgUploaderService {
}

allContentTypesAllowed(): boolean {
if (this.contentTypes.find((type: string) => type === '*') !== undefined) {
return true;
}
return false;
return this.contentTypes.find((type: string) => type === '*') !== undefined;
}

isContentTypeAllowed(mimetype: string): boolean {
if (this.allContentTypesAllowed()) {
return true;
}
if (this.contentTypes.find((type: string) => type === mimetype ) !== undefined) {
return true;
}
return false;
return this.contentTypes.find((type: string) => type === mimetype) !== undefined;
}

makeUploadFile(file: File, index: number): UploadFile {
Expand Down

0 comments on commit ee0fc06

Please sign in to comment.