Merge Objects prototype extensions

This commit is contained in:
djmaze 2020-09-04 17:07:35 +02:00
parent 0647b5201f
commit f2d194947d
26 changed files with 108 additions and 127 deletions

View file

@ -2,7 +2,7 @@ import ko from 'ko';
import { FileType } from 'Common/Enums';
import { bMobileDevice } from 'Common/Globals';
import { pInt, isNonEmptyArray, getFileExtension, friendlySize } from 'Common/Utils';
import { pInt, getFileExtension, friendlySize } from 'Common/Utils';
import {
attachmentDownload,
attachmentPreview,
@ -149,7 +149,7 @@ export const staticCombinedIconClass = (data) => {
let result = '',
types = [];
if (isNonEmptyArray(data)) {
if (Array.isNotEmpty(data)) {
result = 'icon-attachment';
types = data.map(item => item ? staticFileType(getFileExtension(item[0]), item[1]) : '')
.filter((value, index, self) => !!value && self.indexOf(value) == index);