-
Notifications
You must be signed in to change notification settings - Fork 17
Throw when using Nodejs version in browser #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,11 @@ var | |
// Adds on the fly methods promisification | ||
Kuzzle.prototype.bluebird = bluebird; | ||
|
||
if (typeof window !== 'undefined' && typeof BUILT === 'undefined') { | ||
throw new Error('It looks like you are using the Nodejs version of Kuzzle SDK ' + | ||
'in a browser. ' + | ||
'It is strongly recommended to use the browser-specific build instead. ' + | ||
'Learn more at https://github.com/kuzzleio/sdk-javascript/tree/master#browser'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I cannot find that anchor in our README file, either in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the anchor in the README is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
module.exports = Kuzzle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we now throw an error, we are more than "strongly recommending" to use the built-version of the SDK. :-)