Skip to content

Commit

Permalink
fix: do not warn about legacy capi in production (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
wattanx authored Jun 12, 2023
1 parent 2783a30 commit a6e6787
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/bridge/src/runtime/capi.legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const msgPrefix = '[bridge] [legacy capi]'
const unsupported = message => () => { throw new Error(`${msgPrefix} ${message} ${checkDocsMsg}`) }
const _warned = {}
const warnOnce = (id, message) => {
if (!process.dev) { return }
if (!_warned[id]) {
console.warn(msgPrefix, message, checkDocsMsg)
_warned[id] = true
Expand Down

0 comments on commit a6e6787

Please sign in to comment.