braid-text 0.0.22 → 0.0.24

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.
Files changed (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1122,7 +1122,7 @@ function OpLog_remote_to_local(doc, frontier) {
1122
1122
 
1123
1123
  let local_version = []
1124
1124
 
1125
- let max_version = doc.getLocalVersion()[0] ?? -1
1125
+ let max_version = Math.max(-1, ...doc.getLocalVersion())
1126
1126
  for (let i = 0; i <= max_version; i++) {
1127
1127
  if (map[doc.localToRemoteVersion([i])[0].join("-")]) {
1128
1128
  local_version.push(i)
@@ -1490,4 +1490,7 @@ function validate_patch(x) {
1490
1490
  if (typeof x.content !== 'string') throw new Error(`invalid patch content: must be a string`)
1491
1491
  }
1492
1492
 
1493
+ braid_text.encode_filename = encode_filename
1494
+ braid_text.decode_filename = decode_filename
1495
+
1493
1496
  module.exports = braid_text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-text",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "Library for collaborative text over http using braid.",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braidjs",