Fixed publish before subscription error

You can now publish to a subscription less channel without generating a
js error.