File size: 254 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
let errorOnce = (_: string) => {}
if (process.env.NODE_ENV !== 'production') {
  const errors = new Set<string>()
  errorOnce = (msg: string) => {
    if (!errors.has(msg)) {
      console.error(msg)
    }
    errors.add(msg)
  }
}

export { errorOnce }