`if (workspace === false)` returns, so the rest of the function implicitly presupposes that `workspace` is not `false`. Either put the rest of the function inside the `else if (workspace)` block, or get rid of it entirely. It makes so sense that this block ends here.