Add option to hide buildUri
warnings
No point for it to keep appearing if nobody cares? Anyway, added option to hide it via environment variable for those who are annoyed by it.
This commit is contained in:
parent
3d1d448afb
commit
7b621b7417
1 changed files with 2 additions and 0 deletions
|
@ -200,6 +200,7 @@ export function buildURI(UrlObj: LbryUrlObj, includeProto: boolean = true, proto
|
||||||
} = UrlObj;
|
} = UrlObj;
|
||||||
const { claimId, claimName, contentName } = deprecatedParts;
|
const { claimId, claimName, contentName } = deprecatedParts;
|
||||||
|
|
||||||
|
// @ifndef IGNORE_BUILD_URI_WARNINGS
|
||||||
if (!isProduction) {
|
if (!isProduction) {
|
||||||
if (claimId) {
|
if (claimId) {
|
||||||
logErrorOnce("'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead");
|
logErrorOnce("'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead");
|
||||||
|
@ -211,6 +212,7 @@ export function buildURI(UrlObj: LbryUrlObj, includeProto: boolean = true, proto
|
||||||
logErrorOnce("'contentName' should no longer be used. Use 'streamName' instead");
|
logErrorOnce("'contentName' should no longer be used. Use 'streamName' instead");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// @endif
|
||||||
|
|
||||||
if (!claimName && !channelName && !streamName) {
|
if (!claimName && !channelName && !streamName) {
|
||||||
console.error("'claimName', 'channelName', and 'streamName' are all empty. One must be present to build a url.");
|
console.error("'claimName', 'channelName', and 'streamName' are all empty. One must be present to build a url.");
|
||||||
|
|
Loading…
Reference in a new issue