Skip to content

Commit

Permalink
Add option to hide buildUri warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
infinite-persistence committed Nov 3, 2021
1 parent 3d1d448 commit 7b621b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/util/lbryURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export function buildURI(UrlObj: LbryUrlObj, includeProto: boolean = true, proto
} = UrlObj;
const { claimId, claimName, contentName } = deprecatedParts;

// @ifndef IGNORE_BUILD_URI_WARNINGS
if (!isProduction) {
if (claimId) {
logErrorOnce("'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead");
Expand All @@ -211,6 +212,7 @@ export function buildURI(UrlObj: LbryUrlObj, includeProto: boolean = true, proto
logErrorOnce("'contentName' should no longer be used. Use 'streamName' instead");
}
}
// @endif

if (!claimName && !channelName && !streamName) {
console.error("'claimName', 'channelName', and 'streamName' are all empty. One must be present to build a url.");
Expand Down

0 comments on commit 7b621b7

Please sign in to comment.