Gravit Designer discussion

$.gDialog('close') results in an error on second call

Reproduce by pasting this into the console:

var $d = $('<div>dialog</div>'); $d.gDialog({});
$d.gDialog('open');
// 1st call, fine
$d.gDialog('close'); 
$d.gDialog('open');
// 2nd call, error: Uncaught TypeError:
// Cannot read property 'options' of undefined
$d.gDialog('close'); 

Cheers

Hi @owzim, thanks for reporting it. I can reproduce it and will file it for fixing.
For now, if you need to make two calls on gDialog, you can, on each call, generate gDialog code again, using $d.gDialog({});

Thanks for the catch.

1 Like