sriracha icon indicating copy to clipboard operation
sriracha copied to clipboard

Crash when trying to add new document

Open drpepper opened this issue 9 years ago • 0 comments

I cannot add documents for certain models that contain references. The error looks like this:

TypeError: .../node_modules/sriracha-admin/lib/views/fields/ref.jade:17
    13|                     - var ref = value
    14|                     li
  > 15|                         a.btn.btn-success(href=appPath + '/' + ref._collectionName + '/' + ref)
    16|                             | #{ref}
    17|     if errors[path]
    18|         span.help-block.text-danger= errors[path].message

Cannot read property '_collectionName' of undefined
    at eval (eval at <anonymous> (/Users/himmelattack/projects/cri/IdeaWeave/server/node_modules/jade/lib/index.js:218:8), <anonymous>:846:61)

I can gather than value must be undefined, leading to ref being undefined as well, but my understanding drops off after that.

Can someone please help?

drpepper avatar Dec 14 '15 08:12 drpepper