Skip to content

Commit

Permalink
Fix deserialization in production build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Jul 2, 2019
1 parent 79f696f commit a0052bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/type-transform/Serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import { declarePersistable, deserialize, serialize } from 'serialijse'
export function serializable(name: string) {
return <T>(constructor: T) => {
declarePersistable(constructor, name)
Object.defineProperty(constructor, 'name', {
configurable: true,
enumerable: false,
writable: false,
value: name,
})
return constructor
}
}
Expand Down

0 comments on commit a0052bd

Please sign in to comment.