chore: avoid object.freeze in prod

This commit is contained in:
Evan You
2019-09-17 16:23:29 -04:00
parent f595b006c2
commit a5c1b3283d
2 changed files with 6 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
export const EMPTY_OBJ: { readonly [key: string]: any } = Object.freeze({})
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
? Object.freeze({})
: {}
export const EMPTY_ARR: [] = []
export const NOOP = () => {}