zombieJ
6 years ago
committed by
GitHub
30 changed files with 58 additions and 27 deletions
@ -1,9 +1,9 @@ |
|||
import warning from 'warning'; |
|||
|
|||
const warned: Record<string, boolean> = {}; |
|||
export default (valid: boolean, message: string): void => { |
|||
export default (valid: boolean, component: string, message: string): void => { |
|||
if (!valid && !warned[message]) { |
|||
warning(false, message); |
|||
warning(false, `[antd: ${component}] ${message}`); |
|||
warned[message] = true; |
|||
} |
|||
}; |
|||
|
Loading…
Reference in new issue