From a03da2daf5eb9e5456ed0006b3d5305b09941839 Mon Sep 17 00:00:00 2001 From: NightScript <18664762+NightScript370@users.noreply.github.com> Date: Wed, 24 May 2023 15:17:23 -0400 Subject: [PATCH] Replace multi-function call with multi function variables and singular function call --- assets/js/selecting.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/assets/js/selecting.js b/assets/js/selecting.js index e5ef376d86..8a823c3153 100644 --- a/assets/js/selecting.js +++ b/assets/js/selecting.js @@ -199,17 +199,13 @@ function redirect() { var model = 0; if(isN3DS) model = 1; - let redirected = false; - // Start validation - redirected = can_soundhax(major.value, minor.value, nver.value, region.value, model); - if (redirected) return true; - redirected = can_ssloth(major.value, minor.value, nver.value, region.value, model); - if (redirected) return true; - redirected = can_safecerthax(major.value, minor.value, nver.value, region.value, model); - if (redirected) return true; - redirected = can_seedminer(major.value, minor.value, nver.value, region.value, model); - if (redirected) return true; - redirected = can_superskaterhax(major.value, minor.value, nver.value, region.value, model); + let redirected = [ + can_soundhax, + can_ssloth, + can_safecerthax, + can_seedminer, + can_superskaterhax, + ].some(func => func(major.value, minor.value, nver.value, region.value, model)); if (redirected) return true; // if it actually got to this point, there is no exploit available.