Netflix / falcor-router

A Falcor JavaScript DataSource which creates a Virtual JSON Graph document on your app server.
http://netflix.github.io/falcor
Apache License 2.0
104 stars 46 forks source link

Correct way to return path item not found? #208

Open eddieajau opened 7 years ago

eddieajau commented 7 years ago

I'm looking at the falcor-router-demo and it looks like it is suggesting that if a resource is not found, you return a path value of undefined.

  results.push({
    path: ['titlesById', titleId],
    value: undefined
  });

However, in cache/pathValueMerge.js, we've got:

 else if ((pathValue.value !== null) && (pathValue.value.$type === $ref)) {

Am I right in assuming that I should return null, not undefined if the path is not found?

Thanks in advance.