|
@@ -609,13 +609,13 @@ module.exports = class Dashboard extends Plugin {
|
|
|
|
|
|
initEvents () {
|
|
|
// Modal open button
|
|
|
- const showModalTrigger = findAllDOMElements(this.opts.trigger)
|
|
|
- if (!this.opts.inline && showModalTrigger) {
|
|
|
- showModalTrigger.forEach(trigger => trigger.addEventListener('click', this.openModal))
|
|
|
- }
|
|
|
-
|
|
|
- if (!this.opts.inline && !showModalTrigger) {
|
|
|
- this.uppy.log('Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options unless you are planning to call openModal() method yourself', 'error')
|
|
|
+ if (this.opts.trigger && !this.opts.inline) {
|
|
|
+ const showModalTrigger = findAllDOMElements(this.opts.trigger)
|
|
|
+ if (showModalTrigger) {
|
|
|
+ showModalTrigger.forEach(trigger => trigger.addEventListener('click', this.openModal))
|
|
|
+ } else {
|
|
|
+ this.uppy.log('Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself', 'warning')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
this.startListeningToResize()
|