Skip to content

Commit 56aa226

Browse files
committed
Prevent crash if H5P Integration does not provide file icon
1 parent 9503dec commit 56aa226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/h5peditor-init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
H5PEditor.init = function ($form, $type, $upload, $create, $editor, $library, $params, $maxScore, $title, cancelSubmitCallback) {
33
H5PEditor.$ = H5P.jQuery;
44
H5PEditor.basePath = H5PIntegration.editor.libraryUrl;
5-
H5PEditor.fileIcon = H5PIntegration.editor.fileIcon;
5+
H5PEditor.fileIcon = H5PIntegration.editor.fileIcon ?? {};
66
H5PEditor.ajaxPath = H5PIntegration.editor.ajaxPath;
77
H5PEditor.filesPath = H5PIntegration.editor.filesPath;
88
H5PEditor.apiVersion = H5PIntegration.editor.apiVersion;

0 commit comments

Comments
 (0)