Defining class fields is invalid in older versions of JavaScript, which Firefox seems to test for in its add-on scanning. Moving the fields into the class's constructor avoids these errors. This resolves "Errors: Declaring class properties outside of the constructor." of https://github.com/esse-dev/akita/issues/65.
Some minor refactoring to the constructors and fromObject() was done for better consistency.
Testing:
Firefox add-on scan: errors no longer reported/seen
Defining class fields is invalid in older versions of JavaScript, which Firefox seems to test for in its add-on scanning. Moving the fields into the class's constructor avoids these errors. This resolves "Errors: Declaring class properties outside of the constructor." of https://github.com/esse-dev/akita/issues/65.
Some minor refactoring to the constructors and
fromObject()
was done for better consistency.Testing: