Skip to content

Commit

Permalink
fix loops to not ignore last rule
Browse files Browse the repository at this point in the history
  • Loading branch information
hanubeki committed Aug 17, 2024
1 parent 43ee1b5 commit 26e2b85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generate/cosmetic/script-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

let ruleKeys = findRules(rules, host);

for (let i = 0; i < ruleKeys.length - 1; i++) {
for (let i = 0; i < ruleKeys.length; i++) {
let rule = rules[ruleKeys[i]];
if (rule != null) {
if (typeof rule === 'number') {
Expand All @@ -119,7 +119,7 @@

let exceptionKeys = findRules(exceptions, host)

for (let i = 0; i < exceptionKeys.length - 1; i++) {
for (let i = 0; i < exceptionKeys.length; i++) {
let exception = exceptions[exceptionKeys[i]];
if (exception != null) {
if (typeof exception === 'number') {
Expand All @@ -137,7 +137,7 @@

let injectionKeys = findRules(injectionRules, host)

for (let i = 0; i < injectionKeys.length - 1; i++) {
for (let i = 0; i < injectionKeys.length; i++) {
let injection = injectionRules[injectionKeys[i]];
if (injection != null) {
if (typeof injection === 'number') {
Expand Down

0 comments on commit 26e2b85

Please sign in to comment.