Browse Source

fix error

Markus-Rost 4 years ago
parent
commit
5c7424147a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      functions/parse_page.js

+ 2 - 2
functions/parse_page.js

@@ -94,8 +94,8 @@ const removeClassesExceptions = [
  */
 function parse_page(lang, msg, content, embed, wiki, reaction, {title, contentmodel, missing, pageprops: {infoboxes, disambiguation} = {}, uselang = lang.lang, noRedirect = false}, thumbnail = '', fragment = '', pagelink = '') {
 	if ( reaction ) reaction.removeEmoji();
-	if ( !msg?.showEmbed?.() || missing !== undefined || embed.description ) {
-		if ( missing !== undefined ) {
+	if ( !msg?.showEmbed?.() || missing !== undefined || !embed || embed.description ) {
+		if ( missing !== undefined && embed ) {
 			if ( embed.backupField && embed.length < 4750 && embed.fields.length < 25 ) {
 				embed.spliceFields( 0, 0, embed.backupField );
 			}