Skip to content

Id clean-up #14

@radarfox

Description

@radarfox

Hello Jason,

I have found a little (but unpleasant) bug in this adapter. It causes accumulation of data in storage and was causing rapid slowing down of my app in time.

Conditions:

  1. Set a DSLocalStorageAdapterProvider.defaults.basePath to someting
  2. Call create
  3. Call destroy
  4. The id of removed item stays in the datastore in ids map.

It is located on this line: https://github.com/js-data/js-data-localstorage/blob/master/src/index.js#L377

Problem is in the second argument of this call this.removeId(id, resourceConfig.name, options))

The right form is this.removeId(id, resourceConfig, options))

Keep up good work, you saved me hours of frustrations :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions