Work around bug where doc list is active but its el has no parent

No idea what's going on :/

TypeError: Cannot read property 'removeChild' of null
  at HTMLDivElement.<anonymous>()
  at o.app.views.ListFold.o.onClick()
  at o.app.views.ListFold.o.toggle()
  at o.app.views.ListFold.o.close()
  at Function.$.trigger()
  at HTMLDivElement.<anonymous>()
  at o.app.views.DocList.o.onClose()
  at o.app.View.e.detach()
  at Function.$.remove()
pull/343/merge
Thibaut Courouble 9 years ago
parent bc0e3260fe
commit f0ed6af794

@ -111,9 +111,9 @@ $.after = (el, value) ->
$.remove = (value) ->
if $.isCollection(value)
el.parentElement.removeChild(el) for el in $.makeArray(value)
el.parentElement?.removeChild(el) for el in $.makeArray(value)
else
value.parentElement.removeChild(value)
value.parentElement?.removeChild(value)
return
$.empty = (el) ->

Loading…
Cancel
Save