File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " hashtable" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "description" : " Native HashTable and ES6 compatible Map for Node.js" ,
55 "main" : " ./index.js" ,
66 "keywords" : [
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ NAN_METHOD(HashTable::MapConstructor) {
102102NAN_METHOD (HashTable::Get) {
103103 NanScope ();
104104
105- if (args.Length () < 1 ) {
105+ if (args.Length () < 1 || args[ 0 ]-> IsUndefined () || args[ 0 ]-> IsNull () ) {
106106 NanThrowTypeError (" Wrong arguments" );
107107 NanReturnUndefined ();
108108 }
@@ -122,7 +122,7 @@ NAN_METHOD(HashTable::Get) {
122122NAN_METHOD (HashTable::Has) {
123123 NanScope ();
124124
125- if (args.Length () < 1 ) {
125+ if (args.Length () < 1 || args[ 0 ]-> IsUndefined () || args[ 0 ]-> IsNull () ) {
126126 NanThrowTypeError (" Wrong arguments" );
127127 NanReturnUndefined ();
128128 }
@@ -142,7 +142,7 @@ NAN_METHOD(HashTable::Has) {
142142NAN_METHOD (HashTable::Put) {
143143 NanScope ();
144144
145- if (args.Length () < 2 ) {
145+ if (args.Length () < 2 || args[ 0 ]-> IsUndefined () || args[ 0 ]-> IsNull () ) {
146146 NanThrowTypeError (" Wrong arguments" );
147147 NanReturnUndefined ();
148148 }
You can’t perform that action at this time.
0 commit comments