           "sagews"
 
     handle_click : ->
-        if @props.file_search?.length == 0
+        if not @props.file_search?.length > 0
             @props.actions.set_focused_page('project-new-file')
         else
             @create_file()

        <Tip title="Create Button" tip={@tip_text()} placement="left">
            <Button
                style   = {fontSize:'40px', color:'#888'}
                onClick = {=>@props.actions.set_focused_page('project-new-file')}>
                <Icon name='plus-circle' /> {@button_text()}
            </Button>
        </Tip>

        ext = @extension()
        if ext and @props.file_search?.length > 0
            "Create #{@props.file_search}.#{ext}"
        else if not @props.file_search?.length > 0
            "Create or upload files..."
        else
            "Create #{@props.file_search}"
