fix console warning for decodeShortURI()

This commit is contained in:
Simon Grim 2016-03-21 22:58:42 +05:00
parent c5d178779d
commit 7542eddf5b
2 changed files with 7 additions and 6 deletions

View File

@ -832,17 +832,18 @@ function fetchShortenedURI(req) {
console.warn('can\'t fetch URI "' + req + '": daemon is obsolete, version 0.9.35 or higher is required');
return;
}
decodeshorturl( req,
decodeShortURI(req,
function (req, ret) {
if( ret ) {
if (ret) {
twister.URIs[req] = ret;
$.localStorage.set('twistaURIs', twister.URIs);
applyShortenedURI(req, ret);
} else {
console.warn('can\'t fetch URI "' + req + '": ' + ret.message);
console.warn('can\'t fetch URI "' + req + '": null response');
}
}, req);
}, req
);
}
function applyShortenedURI(short, long) {

View File

@ -163,7 +163,7 @@ function _decodeshorturlInternal(locator, timeoutArgs) {
_dhtgetDequeue();
}, locator,
function(req, ret) {
console.warn('can\'t fetch URI "' + req + '" — RPC "decodeshorturl" error: ' + (ret && ret.message) ? ret.message : ret);
console.warn('RPC "decodeshorturl" error: ' + (ret && ret.message) ? ret.message : ret);
_dhtgetsInProgress--;
_dhtgetAbortPending(req);
_dhtgetDequeue();