diff --git a/src-ui/src/app/utils/popper-options.spec.ts b/src-ui/src/app/utils/popper-options.spec.ts index 9d7671cf6..bf350f94c 100644 --- a/src-ui/src/app/utils/popper-options.spec.ts +++ b/src-ui/src/app/utils/popper-options.spec.ts @@ -8,7 +8,7 @@ describe('popperOptionsReenablePreventOverflow', () => { { name: 'preventOverflow', fn: function () {} }, { name: 'preventOverflow', - fn: function () { + fn: function (arg0) { return }, }, diff --git a/src-ui/src/app/utils/popper-options.ts b/src-ui/src/app/utils/popper-options.ts index 71ac715ce..d52a79c8c 100644 --- a/src-ui/src/app/utils/popper-options.ts +++ b/src-ui/src/app/utils/popper-options.ts @@ -3,15 +3,9 @@ import { Options } from '@popperjs/core' export function popperOptionsReenablePreventOverflow( config: Partial ): Partial { - const preventOverflowModifier = config.modifiers?.find( - (m) => m.name === 'preventOverflow' && m.fn?.length === 0 + config.modifiers = config.modifiers?.filter( + (m) => !(m.name === 'preventOverflow' && m.fn?.length === 0) ) - if (preventOverflowModifier) { - config.modifiers.splice( - config.modifiers.indexOf(preventOverflowModifier), - 1 - ) - } const ogPreventOverflowModifier = config.modifiers.find( (m) => m.name === 'preventOverflow' )