Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 2462bf7

Browse files
bug fixs with docker and cursor
1 parent 49d18cf commit 2462bf7

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

DockerFile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ RUN pip install -r requirements.txt
1010

1111
COPY . /app
1212

13-
CMD [ "python", "-u", "./main.py"]
13+
CMD [ "python", "main.py", "0.0.0.0"]

src/static/js/editor/cursor.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ export default class Cursor{
4343

4444
cursorRequest = () => {
4545
let element = get_uuid_element();
46-
return {
47-
type: 'cursor-moves',
48-
data: {
49-
id: element.getAttribute('uuid'),
50-
userId: uuid,
51-
content: getCaretCharacterOffsetWithin(element)
52-
}
53-
};
46+
if (element.hasAttribute('uuid')) {
47+
return {
48+
type: 'cursor-moves',
49+
data: {
50+
id: element.getAttribute('uuid'),
51+
userId: uuid,
52+
content: getCaretCharacterOffsetWithin(element)
53+
}
54+
};
55+
}
5456
}
5557
}

0 commit comments

Comments
 (0)