aral,
@aral@mastodon.ar.al avatar

Realised last night that JavaScript Database (JSDB) doesn’t run the constructor on persisted custom objects (https://codeberg.org/small-tech/jsdb#custom-data-types) when deserialising them because I didn’t know that you apparently have to define your constructor manually when using Object.create().

Will fix it today but it’s something to watch out for if you’re using Object.create() directly.

For more info, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create

#JSDB #customObjects #constructor #bug #JavaScript #NodeJS #SmallTech #SmallWeb

  • All
  • Subscribed
  • Moderated
  • Favorites
  • javascript
  • PowerRangers
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • GTA5RPClips
  • khanakhh
  • kavyap
  • modclub
  • anitta
  • Durango
  • ethstaker
  • cubers
  • vwfavf
  • everett
  • cisconetworking
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • Leos
  • provamag3
  • megavids
  • All magazines