Skip to content

Commit

Permalink
Make promise check generic (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jri committed Mar 26, 2019
1 parent 60d0b5d commit 8b4fab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cxtmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ let cxtmenu = function(params){

if( typeof options.commands === 'function' ){
const res = options.commands(target);
if( res instanceof Promise ){
if( res.then ){
res.then(_commands => {
commands = _commands;
openMenu();
Expand Down

0 comments on commit 8b4fab0

Please sign in to comment.