Comparing version 0.2.0 to 0.3.0
@@ -56,10 +56,5 @@ var util = require('util'); | ||
/* AnyPropertyType */ | ||
/* AnyPropertyType in this case it means that there's no data */ | ||
if (prop_value.type === 0) { | ||
var ret_data; | ||
if (type === X.atoms.ATOM) { | ||
ret_data = {}; | ||
} | ||
return cb(undefined, ret_data); | ||
return cb(undefined, []); | ||
} | ||
@@ -76,15 +71,8 @@ | ||
} else { | ||
/* If ATOM property, get their names so they're cached in x11 library */ | ||
if (name === 'ATOM') { | ||
var data = {}; | ||
async.map( | ||
async.each( | ||
decoded_data, | ||
function(atom, cb) { | ||
X.GetAtomName(atom, function(err, name) { | ||
if (err) { | ||
return cb(err); | ||
} | ||
data[name] = atom; | ||
cb(); | ||
}); | ||
X.GetAtomName(atom, cb); | ||
}, | ||
@@ -95,3 +83,3 @@ function(err) { | ||
} else { | ||
cb(undefined, data); | ||
cb(undefined, decoded_data); | ||
} | ||
@@ -98,0 +86,0 @@ } |
{ | ||
"name": "x11-prop", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "X11 Properties Coder / Encoder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
15527
309