From dce87e9079137067ee078bfd7949c38d85be29bf Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 12 Apr 2017 01:02:29 -0400 Subject: [PATCH] Switch name check to URI check in lbry.getCostInfo() --- ui/js/lbry.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/js/lbry.js b/ui/js/lbry.js index 0360453b7..e87dee4b0 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -243,6 +243,10 @@ lbry.getCostInfo = function(lbryUri, callback, errorCallback) { * - includes_data: Boolean; indicates whether or not the data fee info * from Lighthouse is included. */ + if (!lbryUri) { + throw new Error(`URI required.`); + } + function getCostWithData(name, size, callback, errorCallback) { lbry.stream_cost_estimate({name, size}).then((cost) => { callback({