Fix for update 2.06.2
							parent
							
								
									da3c5b0e15
								
							
						
					
					
						commit
						ab7c7a9a60
					
				
								
									
									
										
											4
										
									
									build.js
									
									
									
									
								
								
							
							
										
											4
										
									
									build.js
									
									
									
									
								|  | @ -47,8 +47,8 @@ if (exposeVarsToGlobalScope && script.startsWith("(function () {") && script.end | |||
| 	script = script.slice("(function () {".length, -"})();".length); | ||||
| 
 | ||||
| // uncompress strings
 | ||||
| // this will break if there is a closing square bracket ("]") in one of the strings
 | ||||
| const stringArrayRaw = script.match(/var S=(\[[^\]]+\]);/)?.[1]; | ||||
| // this will break if the sequence `"];` appears in one of the strings
 | ||||
| const stringArrayRaw = script.match(/var S=(\[.+?"\]);/)?.[1]; | ||||
| if (stringArrayRaw === undefined) throw new Error("cannot find the string array"); | ||||
| const stringArray = JSON.parse(stringArrayRaw); | ||||
| script = script.replace(/\bS\[(\d+)\]/g, (_match, index) => `"${stringArray[index]}"`); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue