Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const pushAdd = (n: Node) => {
const parentId = mirror.getId((n.parentNode as Node) as INode);
if (parentId === -1) {
return addQueue.push(n);
}
adds.push({
parentId,
previousId: !n.previousSibling
? n.previousSibling
: mirror.getId(n.previousSibling as INode),
nextId: !n.nextSibling
? n.nextSibling
: mirror.getId((n.nextSibling as unknown) as INode),
node: serializeNodeWithId(
n,
document,
mirror.map,
blockClass,
true,
inlineStylesheet,
maskAllInputs,
)!,
});
};