minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-12-06 02:54:18 +03:00
parent 0a8af5628a
commit a6ec9330d5
2 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ var TagUIActions = actions.Actions({
// split tag paths... // split tag paths...
.map(function(e){ return e.split(/[\\\/]/g) }) .map(function(e){ return e.split(/[\\\/]/g) })
.flat()) .flat())
.concat(Object.keys((this.data || {}).tags || {})) .concat(this.data ? this.data.tags.tags() : [])
.unique() }, .unique() },
// XXX add support for tag sets and paths... // XXX add support for tag sets and paths...
@ -265,7 +265,7 @@ var TagUIActions = actions.Actions({
that.tags that.tags
.sort() .sort()
// prep for sort... // prep for sort...
.map(function(t, i){ return [t, i, (that.data.tags[t] || {}).len] }) .map(function(t, i){ return [t, i, (that.data.tags.values(t) || {}).len] })
// XXX add ability to sort by popularity, both local // XXX add ability to sort by popularity, both local
// (selected tags) and global... // (selected tags) and global...
.run(function(){ .run(function(){

View File

@ -153,7 +153,7 @@ var TagsClassPrototype = {
var res = [] var res = []
while(code.length > 0){ while(code.length > 0){
c = code.shift() var c = code.shift()
if(c == '[' || c == '('){ if(c == '[' || c == '('){
res.push( brace(code, c == '[' ? ']' : ')') ) res.push( brace(code, c == '[' ? ']' : ')') )