Update Splore to latest JS SDK

This commit is contained in:
Erik Arvidsson
2016-05-02 10:13:27 -07:00
parent a9b523ac58
commit 5fb43b308a
2 changed files with 3 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
"name": "noms-splore",
"devDependencies": {
"@attic/eslintrc": "^1.0.0",
"@attic/noms": "^13.0.0",
"@attic/noms": "^17.0.0",
"@attic/webpack-config": "^2.1.0",
"babel-cli": "6.6.5",
"babel-core": "6.7.2",

View File

@@ -184,7 +184,7 @@ function handleChunkLoad(ref: Ref, val: any, fromRef: ?string) {
const structName = mirror.name;
data.nodes[id] = {name: structName};
const processField = (f: StructFieldMirror) => {
mirror.forEachField((f: StructFieldMirror) => {
const v = f.value;
const kid = process(ref, f.name, id);
if (kid) {
@@ -195,12 +195,7 @@ function handleChunkLoad(ref: Ref, val: any, fromRef: ?string) {
} else {
throw new Error('No kid id.');
}
};
mirror.forEachField(processField);
if (mirror.hasUnion) {
processField(mirror.unionField);
}
});
} else {
invariant(val !== null && val !== undefined);
console.log('Unsupported type', val.constructor.name, val); // eslint-disable-line no-console