Skip to content

Commit 79cbb3e

Browse files
tjclementManuel Overdijk
authored and
Manuel Overdijk
committed
Fixed Model prototyping null references
1 parent 908ffb3 commit 79cbb3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/Model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class Model extends PrioritisedObject {
125125
}
126126

127127
/* If the code is minified, then this.constructor._name is defined, in that case that also goes for the inheriting classes */
128-
while (prototype.constructor._name || (!this.constructor._name && prototype.constructor.name !== 'Model')) {
128+
while (prototype && (prototype.constructor._name || (!this.constructor._name && prototype.constructor.name !== 'Model'))) {
129129
/* Get all properties except the id and constructor of this model */
130130
let propNames = difference(Object.getOwnPropertyNames(prototype), ['constructor', 'id']);
131131

0 commit comments

Comments
 (0)