funkensturm / ember-local-storage

The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
https://www.funkensturm.com/ember-local-storage/
MIT License
218 stars 76 forks source link

Storages can't have dependencies injected in Ember@2.14 #268

Closed kswilster closed 5 years ago

kswilster commented 7 years ago

The following error is thrown when attempting to inject dependencies into a storage in Ember@2.14. I'm not sure if this was explicitly supported before, but it has functioned correctly until at least version 2.12. I can't demonstrate this on ember-twiddle at the moment (it supports up to Ember@2.12) but I've created a simple demo to illustrate this effect. Allowing dependency injection again should be as simple as setting the owner of each StorageFactory right around here

image

fsmanuel commented 7 years ago

@kswilster Thanks for reporting. I'll have a look at it as soon as I have some cycles.

ref: https://github.com/stefanpenner/ember-state-services/commit/11016b0b547456c62f46d91b2d83606bb4c33119#diff-418a1659ad37efb36c19f41815e06d96R64

fsmanuel commented 5 years ago

@kswilster it took some time but this problem should be resolved with the new version.