diff options
author | 0neGal <mail@0negal.com> | 2023-03-09 16:27:51 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-03-09 16:27:51 +0100 |
commit | aad6ce75b752a7300266322019aa2cb72a2b9c3e (patch) | |
tree | 524c276476acf9e9f364e0ae52358f4516f48ff2 /src/app/js | |
parent | cfbc7c33326a840fd4b8941d1d5baaab833efd56 (diff) | |
download | Viper-aad6ce75b752a7300266322019aa2cb72a2b9c3e.tar.gz Viper-aad6ce75b752a7300266322019aa2cb72a2b9c3e.zip |
dont loop through modsobj if it's not set
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/browser.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js index c6c74c9..206b80e 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -129,14 +129,16 @@ var Browser = { let remote_version = packages[i].versions[0].version_number; remote_version = version.format(remote_version); - for (let ii = 0; ii < modsobj.all.length; ii++) { - let mod = modsobj.all[ii]; - - if (normalize(mod.Name) === normalized) { - local_name = mod.Name; - local_version = version.format(mod.Version); - if (version.is_newer(remote_version, local_version)) { - has_update = true; + if (modsobj) { + for (let ii = 0; ii < modsobj.all.length; ii++) { + let mod = modsobj.all[ii]; + + if (normalize(mod.Name) === normalized) { + local_name = mod.Name; + local_version = version.format(mod.Version); + if (version.is_newer(remote_version, local_version)) { + has_update = true; + } } } } |