pixl-server-storage 3.2.5 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-server-storage",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "A key/value/list storage component for the pixl-server framework.",
5
5
  "author": "Joseph Huckaby <jhuckaby@gmail.com>",
6
6
  "homepage": "https://github.com/jhuckaby/pixl-server-storage",
package/storage.js CHANGED
@@ -169,7 +169,7 @@ module.exports = Class.create({
169
169
  // sanity checks
170
170
  if (!value) return callback( new Error("Record value cannot be false.") );
171
171
 
172
- var isBuffer = !!value.fill;
172
+ var isBuffer = Buffer.isBuffer(value);
173
173
  if (isBuffer && !this.isBinaryKey(key)) {
174
174
  return callback( new Error("Buffer values are only allowed with keys containing file extensions, e.g. " + key + ".bin") );
175
175
  }
package/transaction.js CHANGED
@@ -40,7 +40,7 @@ var TransStorageFunctions = {
40
40
  // binary keys not part of transaction system
41
41
  if (this.isBinaryKey(key)) return this.rawStorage.put(key, value, callback);
42
42
  if (!value) return callback( new Error("Value cannot be false.") );
43
- if (value.fill) return callback( new Error("Buffers not allowed in transactions.") );
43
+ if (Buffer.isBuffer(value)) return callback( new Error("Buffers not allowed in transactions.") );
44
44
 
45
45
  this.logDebug(9, "Storing JSON Object in transaction: " + key, this.debugLevel(10) ? value : null);
46
46
  value = JSON.stringify( value );