Skip to content
Snippets Groups Projects
Commit 3730046d authored by chris's avatar chris
Browse files

console.log active

parent 0cae26bf
No related branches found
No related tags found
No related merge requests found
Pipeline #59993 passed with stages
in 4 minutes and 29 seconds
......@@ -23,11 +23,13 @@ const getComment = (state, context) => {
(state.selection.from === state.selection.to &&
last(commentData).data.conversation.length !== 0)
) {
console.log(last(commentData));
console.log('return active', last(commentData));
return last(commentData);
}
console.log('not return active');
return undefined;
}
console.log('not return active 2');
return undefined;
};
......@@ -40,6 +42,7 @@ export default (key, context) => {
},
apply(tr, prev, _, newState) {
const comment = getComment(newState, context);
console.log('active comment', comment);
let createDecoration;
if (comment) {
createDecoration = DecorationSet.create(newState.doc, [
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment