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

View file

@ -22,7 +22,7 @@ module.exports = async (data) => {
let lbrynetFileExt = null;
if (!data.fileExt) {
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 commented 2018-12-18 02:54:49 +01:00 (Migrated from github.com)
Review

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)
// TODO verify that "generated_x" does anything at all