r-dropdown-button
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -88,11 +88,8 @@ "use strict"; | ||
var _this$props = this.props, | ||
_this$props$items = _this$props.items, | ||
items = _this$props$items === void 0 ? [] : _this$props$items, | ||
items = _this$props.items, | ||
_this$props$onClick = _this$props.onClick, | ||
onClick = _this$props$onClick === void 0 ? function () {} : _this$props$onClick; | ||
if (Array.isArray(items) && items.length) { | ||
if (items) { | ||
this.toggle(); | ||
} else if (typeof items === 'function') { | ||
this.toggle(); | ||
} else { | ||
@@ -99,0 +96,0 @@ onClick(this.props); |
{ | ||
"name": "r-dropdown-button", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,5 +19,4 @@ import React,{Component,Fragment,createRef,createContext} from 'react'; | ||
} | ||
var {items = [],onClick = ()=>{}} = this.props; | ||
if(Array.isArray(items) && items.length){this.toggle();} | ||
else if(typeof items === 'function'){this.toggle();} | ||
var {items,onClick = ()=>{}} = this.props; | ||
if(items){this.toggle();} | ||
else{onClick(this.props);} | ||
@@ -24,0 +23,0 @@ } |
26327
699