diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-06-10 07:02:20 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-06-10 07:20:35 -0300 |
| commit | 9c946df709fbeca15bc6e76435cbe30269a2bd3a (patch) | |
| tree | 2e2b465fc089aa56d40dc608d0004a409f1b541e /src/static/js/client-util.js | |
| parent | 7710949c13b149d40195b4203b8a8234039ef5d6 (diff) | |
client, content, css: simple group contributions table filter
Diffstat (limited to 'src/static/js/client-util.js')
| -rw-r--r-- | src/static/js/client-util.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/static/js/client-util.js b/src/static/js/client-util.js index de54945c..8ad31b90 100644 --- a/src/static/js/client-util.js +++ b/src/static/js/client-util.js @@ -16,9 +16,15 @@ export function rebase(href, rebaseKey = 'rebaseLocalized') { export function cssProp(el, ...args) { if (typeof args[0] === 'string' && args.length === 1) { - return getComputedStyle(el).getPropertyValue(args[0]).trim(); + if (el) { + return getComputedStyle(el).getPropertyValue(args[0]).trim(); + } else { + return ''; + } } + if (!el) return; + if (typeof args[0] === 'string' && args.length === 2) { if (args[1] === null) { el.style.removeProperty(args[0]); |