diff --git a/js/animations/molang.js b/js/animations/molang.js index 431f7920a..f028448db 100644 --- a/js/animations/molang.js +++ b/js/animations/molang.js @@ -587,6 +587,7 @@ new ValidatorCheck('molang_syntax', { run() { let check = this; let keywords = ['return', 'continue', 'break']; + let two_expression_regex = (isApp || window.chrome) ? new RegExp('(?|]/)) { issues.push('Expression starts with an invalid character'); } - if ((clear_string.match(/[\w.]\s+[\w.]/) && !keywords.find(k => clear_string.includes(k))) || clear_string.match(/(? clear_string.includes(k))) || clear_string.match(/\)\(/) || (two_expression_regex && clear_string.match(two_expression_regex))) { issues.push('Two expressions with no operator in between'); } if (clear_string.match(/(^|[^a-z0-9_])[\d.]+[a-z_]+/i)) { diff --git a/js/io/formats/bedrock.js b/js/io/formats/bedrock.js index 648e593a7..ee8fe03d4 100644 --- a/js/io/formats/bedrock.js +++ b/js/io/formats/bedrock.js @@ -1137,7 +1137,7 @@ var codec = new Codec('bedrock', { return; } } - if (data) { + if (data && index !== undefined) { if (Group.all.find(group => group.bedrock_binding)) { data.format_version = '1.16.0';