You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing this error on the default example when running inside a react app.
json_object.ts:60 Uncaught TypeError: Cannot read property 'name' of undefined
at Book.newValue (json_object.ts:60)
at Book.set (json_object.ts:85)
at new JSONObject (json_object.ts:157)
at new Book (json-models.ts:46)
Here is the code.
class Book extends JSONObject {
@JSONObject.required
// @ts-ignore
name:string
@JSONObject.optional
// @ts-ignore
summary?:string
}
// This is ok
let book:Book = new Book({ name: "Moby Dick" , summary: "You're my obsession" })
I'm seeing this error on the default example when running inside a react app.
Here is the code.
And here is my tsconfig
Any idea what the problem might be here? Thanks!
The text was updated successfully, but these errors were encountered: