fixes channel claim issue introduced by file extension fix #830

Merged
jessopb merged 1 commit from fixRedirect into master 2018-12-18 02:55:04 +01:00
jessopb commented 2018-12-18 01:08:21 +01:00 (Migrated from github.com)

Previous fix attempted to call split when file_name didn't exist such as on channel claims.
Code now checks for that.
Future not implemented yet: filenames without a . should have '' extension.

Previous fix attempted to call split when file_name didn't exist such as on channel claims. Code now checks for that. Future not implemented yet: filenames without a . should have '' extension.
skhameneh (Migrated from github.com) approved these changes 2018-12-18 02:54:54 +01:00
@ -24,3 +24,3 @@
lbrynetClaimResult = await getClaim(lbrynetUri).catch(() => { return 'invalid URI' });
lbrynetFileExt = lbrynetClaimResult && lbrynetClaimResult.file_name.split('.').slice(-1).pop();
lbrynetFileExt = lbrynetClaimResult && lbrynetClaimResult.file_name && lbrynetClaimResult.file_name.split('.').slice(-1).pop();
}
skhameneh (Migrated from github.com) commented 2018-12-18 02:54:49 +01:00

I'd like to see more verbose logic, I'm not a fan of this being able to return null / false.
I'll investigate how we should handle this at a higher level (larger refactor-type issue)

I'd like to see more verbose logic, I'm not a fan of this being able to return `null` / `false`. I'll investigate how we should handle this at a higher level (larger refactor-type issue)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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: LBRYCommunity/spee.ch#830
No description provided.