Skip to content

Commit

Permalink
Fix line length violations.
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresurf committed Aug 12, 2016
1 parent df177b0 commit 48bcbbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api/javascript-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The best source of docs is the main [ReactOnRails.js](../../node_package/src/Rea
* Set options for ReactOnRails, typically before you call ReactOnRails.register
* Available Options:
* `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events
* `exceptionLogger: function (optional) Any caught exception will be passed to this function as the first argument
* `exceptionLogger: function (optional) Caught exceptions will be passed to this function
*/
setOptions(options)
```
7 changes: 5 additions & 2 deletions node_package/src/ReactOnRails.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ctx.ReactOnRails = {
* Set options for ReactOnRails, typically before you call ReactOnRails.register
* Available Options:
* `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events
* `exceptionLogger: function (optional) Any caught exception will be passed to this function as the first argument
* `exceptionLogger: function (optional) Caught exceptions will be passed to this function
*/
setOptions(options) {
if (options.hasOwnProperty('traceTurbolinks')) {
Expand All @@ -67,7 +67,10 @@ ctx.ReactOnRails = {

if (options.hasOwnProperty('exceptionLogger')) {
if (typeof options.exceptionLogger !== 'function') {
throw new Error('Invalid exceptionLogger passed to ReactOnRails.options: ', JSON.stringify(options));
throw new Error(
'Invalid exceptionLogger passed to ReactOnRails.options: ',
JSON.stringify(options)
);
}

this._options.exceptionLogger = options.exceptionLogger;
Expand Down

0 comments on commit 48bcbbd

Please sign in to comment.