Skip to content

Commit 3df5ea4

Browse files
committed
Fixed issue for React-native android when parsing instructions into string instead of numbers
1 parent eea4434 commit 3df5ea4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dop",
3-
"version": "0.22.3",
3+
"version": "0.22.4",
44
"main": "./dist/dop.nodejs.js",
55
"browser": "./dist/dop.js",
66
"unpkg": "./dist/dop.min.js",

src/protocol/instructions.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ dop.protocol.instructions = {
4343
// Owner -> Subscriptor
4444
patch: 5, // [ 1234, <instruction>, <object_id>, <version>, <patch>]
4545
// [-1234, 0]
46+
47+
48+
49+
1: 'subscribe',
50+
2: 'unsubscribe',
51+
3: 'call',
52+
4: 'broadcast',
53+
5: 'patch'
4654
};
4755

48-
for (var instruction in dop.protocol.instructions)
49-
dop.protocol.instructions[ dop.protocol.instructions[instruction] ] = instruction;
56+
// for (var instruction in dop.protocol.instructions)
57+
// dop.protocol.instructions[ dop.protocol.instructions[instruction] ] = instruction;

0 commit comments

Comments
 (0)