mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 15:45:03 -05:00
bb04841504
* [track-changes] Ignore duplicated packs when zipping SL history * Fix incorrect `ObjectId` import in unit tests GitOrigin-RevId: 165fcaa0c7bc57d383d01eedaf6dd3b078aff2aa
18 lines
336 B
JavaScript
18 lines
336 B
JavaScript
const _ = require('lodash')
|
|
|
|
/**
|
|
* Compares a deep equality of Packs excluding _id
|
|
*/
|
|
function packsAreDuplicated(pack1, pack2) {
|
|
return Boolean(
|
|
pack1 &&
|
|
pack2 &&
|
|
pack1.v === pack2.v &&
|
|
_.isEqual(pack1.meta, pack2.meta) &&
|
|
_.isEqual(pack1.op, pack2.op)
|
|
)
|
|
}
|
|
|
|
module.exports = {
|
|
packsAreDuplicated,
|
|
}
|