[Groonga-commit] droonga/express-droonga at 63fd90d [master] Don't duplicate command type information

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Dec 16 16:07:11 JST 2013


YUKI Hiroshi	2013-12-16 16:07:11 +0900 (Mon, 16 Dec 2013)

  New Revision: 63fd90db8646771fffbfccbe5cda171a7864f30c
  https://github.com/droonga/express-droonga/commit/63fd90db8646771fffbfccbe5cda171a7864f30c

  Message:
    Don't duplicate command type information

  Modified files:
    lib/adapter/command.js

  Modified: lib/adapter/command.js (+2 -3)
===================================================================
--- lib/adapter/command.js    2013-12-16 16:05:15 +0900 (09fb6f8)
+++ lib/adapter/command.js    2013-12-16 16:07:11 +0900 (d818e67)
@@ -3,7 +3,6 @@ var crypto = require('crypto');
 
 function Command(options) {
   this._options = options || {};
-  this._commandTypes = this.constructor.commandTypes;
 }
 Command.commandTypes = [];
 Command.extend = function(targetClass) {
@@ -22,8 +21,8 @@ Command.extend = function(targetClass) {
   targetClass.isInstance = function(modelInstance) {
     return (
       modelInstance &&
-      modelInstance._commandTypes &&
-      modelInstance._commandTypes.indexOf(this) > -1
+      modelInstance.constructor.commandTypes &&
+      modelInstance.constructor.commandTypes.indexOf(this) > -1
     );
   };
 };
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index