History

Fix "Cannot read property load of undefined"

Thibaut Courouble committed 9 years ago

Commit 612aeaf1 parent d59d43e2 files · +2 −2Browse files

Showing the changes to assets/javascripts (2 of 2 files). Show all

Unified · Split

2 files
  1. assets/javascripts/views/sidebar/doc_list.coffee +1 −1
  2. assets/javascripts/views/sidebar/results.coffee +1 −1
assets/javascripts/views/sidebar/doc_list.coffee+1−1
@@ -167,7 +167,7 @@ class app.views.DocList extends app.View · 166 unmodified lines
167 else if slug = event.target.getAttribute('data-enable')167 else if slug = event.target.getAttribute('data-enable')
168 $.stopEvent(event)168 $.stopEvent(event)
169 doc = app.disabledDocs.findBy('slug', slug)169 doc = app.disabledDocs.findBy('slug', slug)
170 app.enableDoc(doc, @onEnabled, @onEnabled)170 app.enableDoc(doc, @onEnabled, @onEnabled) if doc
171 return171 return
172 172
173 onEnabled: =>173 onEnabled: =>
assets/javascripts/views/sidebar/results.coffee+1−1
@@ -65,4 +65,4 @@ class app.views.Results extends app.View · 64 unmodified lines
65 if slug = event.target.getAttribute('data-enable')65 if slug = event.target.getAttribute('data-enable')
66 $.stopEvent(event)66 $.stopEvent(event)
67 doc = app.disabledDocs.findBy('slug', slug)67 doc = app.disabledDocs.findBy('slug', slug)
68 app.enableDoc(doc, @onDocEnabled.bind(@, doc), $.noop)68 app.enableDoc(doc, @onDocEnabled.bind(@, doc), $.noop) if doc