sortable-dnd
sortable-dnd copied to clipboard
Fix for component testing
Hi!
If someone will test VueVirtualDragList in component test using e.g. Vitest then this line will fail -> https://github.com/mfuu/sortable-dnd/blob/ab5f10b74733f5184f269d20cc63d87aa5669c19/src/utils.js#L52
because pre=undefined
For me it works when I add some default (webkit at last line)
const pre = (Array.prototype.slice
.call(styles)
.join('')
.match(/-(moz|webkit|ms)-/) ||
(styles.OLink === '' && ['', 'o']))[1] || 'webkit';
So I'm thinking about how to handle it because otherwise it isn't possible to test components that use this library under the hood. WDYT?
This issue has been resolved in version 0.6.11 and later.