mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Simplify this a bit more
This commit is contained in:
parent
1b7cacc877
commit
f06ff85b7d
@ -8,7 +8,7 @@ describe('popperOptionsReenablePreventOverflow', () => {
|
||||
{ name: 'preventOverflow', fn: function () {} },
|
||||
{
|
||||
name: 'preventOverflow',
|
||||
fn: function () {
|
||||
fn: function (arg0) {
|
||||
return
|
||||
},
|
||||
},
|
||||
|
@ -3,15 +3,9 @@ import { Options } from '@popperjs/core'
|
||||
export function popperOptionsReenablePreventOverflow(
|
||||
config: Partial<Options>
|
||||
): Partial<Options> {
|
||||
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'
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user