 
     fadeTo = (to, duration) ->
         (text_object) ->
-            current = text_object.children[0].material.uniforms.opacity.value
+            current = if text_object.children[0]?
+                text_object.children[0].material.uniforms.opacity.value
+            else 0
             i = d3.interpolate current, to
             getTransitionPromise(i, duration) text_object
 

                            .filter (child) -> child isnt node
                        parent = node._parent
                        promises = siblings.concat(parent).map (child) ->
                                # word_object = _getOneWord child._text_object, node.word
                                fadeTo(0, 1000) child._text_object
                        return Promise.all promises
                .then ->
                    # Fade in children
                    if node.children?
                        promises = node.children.map (child) ->
                             fade(0.2, 1, 1000) child._text_object
                        return Promise.all promises
                .then ->
                    # Traverse next parent

    LINE_SPACING = 40

    getWordIndex = (line, word) ->
        expression = if word is "—" then word else "\\b#{word}\\b"
        regex = new RegExp expression, "i"
        line.search regex

    alignToNode = (parent) ->
