Skip to content

Commit 3b78409

Browse files
authored
Merge pull request #48 from denvaar/image-picker-display-mode-fix
Fix Cannot read property 'destroy' of undefined
2 parents 9cad366 + 5266331 commit 3b78409

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/image-picker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ function init(Survey, $) {
8484
},
8585
willUnmount: function(question, el) {
8686
var $el = $(el).find("select");
87-
$el.data("picker").destroy();
87+
if ($el.data("picker")) {
88+
$el.data("picker").destroy();
89+
}
8890
}
8991
};
9092

0 commit comments

Comments
 (0)