Skip to content

Commit 5266331

Browse files
committed
Fix Cannot read property 'destroy' of undefined
1 parent 9cad366 commit 5266331

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)