braidfs 0.0.85 → 0.0.87

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 +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -711,7 +711,8 @@ async function sync_url(url) {
711
711
  // then we can just remove those
712
712
  // and add event
713
713
  var fork_set = new Set(self.fork_point)
714
- if (parents.every(p => fork_set.has(p))) {
714
+ if (parents.length &&
715
+ parents.every(p => fork_set.has(p))) {
715
716
  parents.forEach(p => fork_set.delete(p))
716
717
  fork_set.add(event)
717
718
  self.fork_point = [...fork_set.values()]
@@ -906,7 +907,7 @@ async function ensure_path(path) {
906
907
  ////////////////////////////////
907
908
 
908
909
  function normalize_url(url) {
909
- return url.replace(/(\/index|\/)+$/, '')
910
+ return url.replace(/(\/index)*\/?$/, '')
910
911
  }
911
912
 
912
913
  async function is_dir(p) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braidfs",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "braid technology synchronizing files and webpages",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braidfs",