Javascritp error on facebook canvas app authentication

There is a javascript error when FACEBOOK_APP_NAMESPACE is not a number because tries to resolve it as a non existing variable.
By default its value of is the same as FACEBOOK_APP_ID and is a number so the bug does not appear until you change the configuration.