mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
fixed stickies' path issue
This commit is contained in:
parent
1a4a7ac6f6
commit
e698ee586a
@ -8,7 +8,7 @@
|
||||
}
|
||||
, "dependencies": {
|
||||
"express": "~>4.9.0",
|
||||
"gun": "0.0.9-l"
|
||||
"gun": "0.0.9-m"
|
||||
}
|
||||
, "scripts": {
|
||||
"start": "node express.js",
|
||||
|
7
gun.js
7
gun.js
@ -134,7 +134,7 @@
|
||||
return {converge: true, incoming: true};
|
||||
}
|
||||
}
|
||||
return {err: Gun.log("you have not properly handled recursion through your data or filtered it as JSON")};
|
||||
return {err: "you have not properly handled recursion through your data or filtered it as JSON"};
|
||||
}
|
||||
var context = Gun.shot();
|
||||
context.HAM = {};
|
||||
@ -325,7 +325,10 @@
|
||||
, val = gun._.node[field];
|
||||
gun._.field = field;
|
||||
if(Gun.is.soul(val)){ // we might end on a link, so we must resolve
|
||||
return gun.load(val).shot.then(trace);
|
||||
return gun.load(val, function(){
|
||||
gun._ = this._;
|
||||
trace();
|
||||
});
|
||||
} else
|
||||
if(path.length){ // we cannot go any further, despite the fact there is more path, which means the thing we wanted does not exist.
|
||||
gun.shot('then').fire();
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ "name": "gun"
|
||||
, "version": "0.0.9-l"
|
||||
, "version": "0.0.9-m"
|
||||
, "author": "Mark Nadal"
|
||||
, "description": "Graph engine."
|
||||
, "engines": {
|
||||
|
@ -445,5 +445,19 @@ describe('Gun', function(){
|
||||
}, 100);
|
||||
});
|
||||
|
||||
it('load blank set get path get', function(done){ // stickies issue
|
||||
gun.load("examples/list/foobar").blank(function(){
|
||||
this.set({
|
||||
id: 'foobar',
|
||||
title: 'awesome title',
|
||||
todos: {}
|
||||
});
|
||||
}).get(function(data){
|
||||
expect(data.id).to.be('foobar');
|
||||
}).path('todos').get(function(todos){
|
||||
expect(todos).to.not.have.property('id');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -4,12 +4,12 @@ NOTES FROM FORREST:
|
||||
-2. gun.on() needs to be chainable with map and stuff.
|
||||
-1. Maybe make the map module core to gun?
|
||||
|
||||
1 make raw HTTP work and document it, document that attach needs to be BEFORE listen. (talk to AJ)
|
||||
2 make sure you SUPPRESS your comments, Mark.
|
||||
1 make raw HTTP work and document it (DONE), document that attach needs to be BEFORE listen. (talk to AJ)
|
||||
2 make sure you SUPPRESS your comments, Mark. (DONE)
|
||||
3 .get doesn't work on subsequent closures. WHYYY??
|
||||
4 HOW DO I DELETE? Mark: delete the actual field from the data, but not the stream/meta.
|
||||
5 security ideas: have gun KEY regexs that are whitelist/blacklist. Off the keys.
|
||||
6 Forrest says, "arrays".
|
||||
6 Forrest says, "arrays". (LISTS!)
|
||||
7 get VAL without gun meta-data.
|
||||
8 make it work with just Gun('/gun');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user