These are chat archives for jescalan/roots

12th
Sep 2016
Anthony Nicholls
@gants102_twitter
Sep 12 2016 13:08
@jescalan I have some front matter with tags for each post and in the page template I want to split the individual tags by tabs and wrap them in there own link element with a corresponding class so they can be styled separately. This is the error message I am getting
Potentially unhandled rejection [24] TypeError: /Users/anthonynicholls/Documents/Development/sustainability-week/views/layout/single_event.jade:25
    23|         span #{post.tag}
    24|           var tags = post.tag.split('\t')
  > 25|           each tag in tags
    26|             span(class : 'tags') #{tags.tag}
    27|       block content
    28|

Cannot read property 'length' of undefined
  at eval (<anonymous>:189:31)
  at eval (<anonymous>:226:4)
  at eval (<anonymous>:345:22)
  at res (/Users/anthonynicholls/Documents/Development/sustainability-week/node_modules/jade/lib/index.js:219:38)
  at Object.exports.render (/Users/anthonynicholls/Documents/Development/sustainability-week/node_modules/jade/lib/index.js:349:43)
  at /usr/local/lib/node_modules/roots/node_modules/accord/lib/adapters/jade/1.x.js:37:31
  at compile (/usr/local/lib/node_modules/roots/node_modules/accord/lib/adapters/jade/1.x.js:70:15)
  at Jade._render (/usr/local/lib/node_modules/roots/node_modules/accord/lib/adapters/jade/1.x.js:35:14)
  at Jade.Adapter.render (/usr/local/lib/node_modules/roots/node_modules/accord/lib/adapter_base.js:122:19)
  at CompilePass.compile_or_pass (/usr/local/lib/node_modules/roots/lib/compiler.js:522:27)
  at tryCatchReject (/usr/local/lib/node_modules/roots/node_modules/when/lib/makePromise.js:845:30)
  at runContinuation1 (/usr/local/lib/node_modules/roots/node_modules/when/lib/makePromise.js:804:4)
  at Fulfilled.when (/usr/local/lib/node_modules/roots/node_modules/when/lib/makePromise.js:592:4)
  at Pending.run (/usr/local/lib/node_modules/roots/node_modules/when/lib/makePromise.js:483:13)
  at Scheduler._drain (/usr/local/lib/node_modules/roots/node_modules/when/lib/Scheduler.js:62:19)
  at Scheduler.drain (/usr/local/lib/node_modules/roots/node_modules/when/lib/Scheduler.js:27:9)
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickCallback (internal/process/next_tick.js:98:9)
Tom Kraak
@tkraak
Sep 12 2016 13:34
@gants102_twitter log out tags
Jeff Escalante
@jescalan
Sep 12 2016 14:27
looks like tags is undefined, as the error says