first commit
This commit is contained in:
14
node_modules/framer-motion/dist/es/utils/shallow-compare.mjs
generated
vendored
Normal file
14
node_modules/framer-motion/dist/es/utils/shallow-compare.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function shallowCompare(next, prev) {
|
||||
if (!Array.isArray(prev))
|
||||
return false;
|
||||
const prevLength = prev.length;
|
||||
if (prevLength !== next.length)
|
||||
return false;
|
||||
for (let i = 0; i < prevLength; i++) {
|
||||
if (prev[i] !== next[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export { shallowCompare };
|
||||
Reference in New Issue
Block a user