falcor-sync-model
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -25,3 +25,9 @@ 'use strict'; | ||
} else if (path.length - idx === 0) { | ||
return obj && obj.$type ? obj.value : obj; | ||
if (obj && obj.$type === 'error') { | ||
return undefined; | ||
} else if (obj && obj.$type) { | ||
return obj.value; | ||
} else { | ||
return obj; | ||
} | ||
} else if (obj === null || obj === undefined) { | ||
@@ -28,0 +34,0 @@ return obj; |
{ | ||
"name": "falcor-sync-model", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A Falcor model that can be read from synchronously", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -7,3 +7,3 @@ # Falcor Sync Model | ||
**Synchronous rendering** - Unfortunately, current versions of Angular and React can't render promises. Using Falcor thus requires keeping a separate data store which duplicates the contents of the cache, and writing code to keep the two in sync. | ||
**Synchronous rendering** - Unfortunately, current versions of Angular and React can only render synchronously, i.e. can't render promises. Using Falcor thus requires keeping a separate data store which duplicates the contents of the cache, and writing code to keep the two in sync.[*](https://github.com/Netflix/falcor/issues/572) | ||
@@ -31,3 +31,3 @@ ## The solution | ||
source: new HttpDataSource('/model.json') | ||
}) | ||
}).batch() | ||
} | ||
@@ -34,0 +34,0 @@ }, |
7450
75