Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Null check on not found collection: issue #33 #37

Closed
wants to merge 1 commit into from

Conversation

psamsotha
Copy link

Fixes #33

Two changes, discussed here

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@psamsotha
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@@ -437,7 +437,7 @@ export class InMemoryBackendService {
// tries to parse id as number if collection item.id is a number.
// returns the original param id otherwise.
protected parseId(collection: {id: any}[], id: string): any {
if (!id) { return null; }
if (!collection || !id) { return null; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes to this one.

@@ -220,7 +220,7 @@ export class InMemoryBackendService {
if ('commands' === reqInfo.base.toLowerCase()) {
return this.commands(reqInfo);

} else if (this.inMemDbService[reqMethodName]) {
} else if (this.inMemDbService[reqMethodName] && reqInfo.collection) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this this one. The override method should run whether reqInfo.collection is present or not.

@wardbell
Copy link
Contributor

Closing because PR #39 handles the approved change

@wardbell wardbell closed this Sep 30, 2016
@psamsotha psamsotha deleted the issue-33 branch September 30, 2016 02:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants