@sanity/desk-tool
Version:
Tool for managing all sorts of content in a structured manner
19 lines (18 loc) • 385 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getAttrs = getAttrs;
exports.isSameAnnotation = isSameAnnotation;
function isSameAnnotation(a, b) {
if (a && b) {
return a.author === b.author && a.chunk === b.chunk;
}
if (!a && !b) {
return true;
}
return false;
}
function getAttrs(doc) {
return doc.draft || doc.published;
}