dredless 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dredless",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A fully-featured and from-scratch headless drednot.io client implementation written in pure js.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/certainhuman/dredless#readme",
@@ -34,7 +34,8 @@ export class ModelReader {
34
34
 
35
35
  readFieldDelta() {
36
36
  const raw = this.readUnsigned();
37
- return (raw & 1) === 0 ? raw / 2 : -(raw >> 1);
37
+ const magnitude = Math.floor(raw / 2);
38
+ return raw % 2 === 0 ? magnitude : -magnitude;
38
39
  }
39
40
 
40
41
  readBlob() {