Skip to content

Commit

Permalink
Made requested changes from code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Dec 19, 2024
1 parent 139c10a commit a646004
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/common/modules/AutocorrectHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ BrowserCommunication.addListener(COMMUNICATION_MESSAGE_TYPE.AUTOCORRECT_BACKGROU
});

browser.runtime.onMessage.addListener((message, sender) => {
// console.log(message);
if (message.type === COMMUNICATION_MESSAGE_TYPE.AUTOCORRECT_CONTENT) {
const response = {
type: COMMUNICATION_MESSAGE_TYPE.AUTOCORRECT_CONTENT,
Expand Down
6 changes: 3 additions & 3 deletions src/content_scripts/autocorrect.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ function getCaretPosition(target) {
if (selection.rangeCount !== 1) {
return null;
}
const _range = selection.getRangeAt(0);
if (!_range.collapsed) {
const arange = selection.getRangeAt(0);
if (!arange.collapsed) {
return null;
}
const range = _range.cloneRange();
const range = arange.cloneRange();
const temp = document.createTextNode("\0");
range.insertNode(temp);
const caretposition = target.innerText.indexOf("\0");
Expand Down

0 comments on commit a646004

Please sign in to comment.