Fix non-file page edit error
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -43,7 +43,7 @@ class GlModelViewer extends ImageHandler {
|
||||
|
||||
public static function onAlternateEditPreview( EditPage $editor, Content $content, string &$previewHTML, ?ParserOutput &$parserOutput ) {
|
||||
$file = MediaWikiServices::getInstance()->getRepoGroup()->findFile($editor->getTitle());
|
||||
if ($file->getMimeType() !== 'model/gltf-binary') {
|
||||
if (!$file || $file->getMimeType() !== 'model/gltf-binary') {
|
||||
return true;
|
||||
}
|
||||
$out = $editor->getContext()->getOutput();
|
||||
|
||||
Reference in New Issue
Block a user