1. adamschmideg
  2. depresso

Commits

adamschmideg  committed f5b9a8e

Fix Db.uniquePaths if spahql select returns weird objects @1.5

  • Participants
  • Parent commits baddd2f
  • Branches default

Comments (0)

Files changed (2)

File depresso.coffee

View file
  • Ignore whitespace
   uniquePaths: (absPath) ->
     paths = @db().select absPath.asString()
     # fix spahql weirdness
-    _(paths).map (p) ->
-      new UniquePath(if _.isString p then p else p.path)
+    fixed = _(paths).map (p) ->
+      path = if _.isString p then p else p.path
+      if path then new UniquePath(path) else null
+    _.compact fixed
 
   update: (paths, defValue=null) ->
     db = @

File package.json

View file
  • Ignore whitespace
 {
   "name": "depresso",
-  "version": "0.0.4",
+  "version": "0.0.5",
   "author": {
     "name": "Adam Schmideg",
     "email": "adam@schmideg.net",