sheet_to_row_object_array throws away options object #80

Closed
opened 2014-07-07 23:25:27 +00:00 by ChrisBurkeBSD · 1 comment
ChrisBurkeBSD commented 2014-07-07 23:25:27 +00:00 (Migrated from github.com)

function sheet_to_row_object_array(sheet, opts) { return sheet_to_json(sheet, opts == null ? opts : {}); }

The opts object is never passed on here. I think replacing "opts == null ? opts : {}" with "opts || {}" would fit bette.

function sheet_to_row_object_array(sheet, opts) { return sheet_to_json(sheet, opts == null ? opts : {}); } The opts object is never passed on here. I think replacing "opts == null ? opts : {}" with "opts || {}" would fit bette.
SheetJSDev commented 2014-07-07 23:30:03 +00:00 (Migrated from github.com)

@ChrisBurkeBSD I noticed that and actually fixed it in my local copy (both here and in js-xls ), so it will appear in the next update. Thanks for pointing it out!

I actually prefer opts != null ? opts : {} because the implicit boolean check is much more complex than a simple comparison against null or undefined

@ChrisBurkeBSD I noticed that and actually fixed it in my local copy (both here and in [js-xls](https://github.com/SheetJS/js-xls) ), so it will appear in the next update. Thanks for pointing it out! I actually prefer `opts != null ? opts : {}` because the implicit boolean check is much more complex than a simple comparison against null or undefined
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#80
No description provided.