lib/carte/client/views/cards.cjsx in carte-server-0.0.12 vs lib/carte/client/views/cards.cjsx in carte-server-0.0.13
- old
+ new
@@ -9,13 +9,13 @@
error: false
componentDidMount: ()->
console.log 'component did mount'
@props.cards.on 'sync', @forceUpdate.bind(@, null)
- @props.card.on 'sync', @forceUpdate.bind(@, null)
- @props.card.on 'error', (model, response)=>
- @setState error: response
- @forceUpdate.bind(@, null)
+ if @props.card
+ @props.card.on 'error', (model, response)=>
+ @setState error: response
+ @forceUpdate.bind(@, null)
render: ->
console.log 'render cards', @props.cards, @state
if @state.error
<div className='row'>