diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 1a6481390e..84d1f4b91e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1542,13 +1542,16 @@ try { var maxContrastHex = window.getComputedStyle(document.documentElement) - .getPropertyValue('--color-text-maxcontrast') + .getPropertyValue('--color-text-maxcontrast').trim() + if (maxContrastHex.length < 4) { + throw Error(); + } var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16) } catch(error) { var maxContrast = OCA.Accessibility && OCA.Accessibility.theme === 'themedark' - ? '130' - : '118' + ? 130 + : 118 } // size column