Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove one of multiple models #2

Open
dereksweet opened this issue Apr 16, 2017 · 0 comments
Open

Can't remove one of multiple models #2

dereksweet opened this issue Apr 16, 2017 · 0 comments

Comments

@dereksweet
Copy link

Hello. Thanks so much for the component. Am having an issue using the remove() method however. It works fine when I only have one of a model stored, but once I add two or more an error is thrown upon the call to remove().

For example if I store one record to /book/1 and then call MyModel.remove('/book/1'), it works just fine. However if I store one record to /book/1, and another record to /book/2, and THEN try and call MyModel.remove('/book/1') it throws the following error:

2017-04-16 01:41:42.721 [error][tid:com.facebook.react.AsyncLocalStorageQueue][RCTConvert.m:58] JSON value '(
    "/book/2"
)' of type NSMutableArray cannot be converted to NSString
2017-04-16 01:41:42.729 [error][tid:com.facebook.react.AsyncLocalStorageQueue][RCTUtils.m:395] 
Error: {
    message = "Entries must be arrays of the form [key: string, value: string], got: (\n    \"[\\\"/book/2\\\"]\"\n)";
}

Other than this the component works absolutely perfectly for my needs so I hope I am just doing something wrong or it's an easy fix. Let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant