Skip to content

Commit 15c04f3

Browse files
committed
fix type in addMarkerToInjectRule
1 parent 49e15b9 commit 15c04f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/tswebextension/src/lib/common/cosmetic-api.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class CosmeticApiCommon {
204204
* @returns Modified rule with injected content marker into stylesheet.
205205
*/
206206
private static addMarkerToInjectRule(rule: CosmeticRule): string {
207-
const result = [];
207+
const result: string[] = [];
208208
const ruleContent = rule.getContent();
209209
// if rule text has content attribute we don't add rule marker
210210
if (CosmeticApiCommon.CONTENT_ATTR_RE.test(ruleContent)) {
@@ -219,9 +219,9 @@ export class CosmeticApiCommon {
219219
: `${ruleTextWithoutCloseBrace}${SEMICOLON}`;
220220
result.push(ruleTextWithSemicolon);
221221
result.push(CosmeticApiCommon.INJECT_HIT_START);
222-
result.push(rule.getFilterListId());
222+
result.push(String(rule.getFilterListId()));
223223
result.push(CosmeticApiCommon.HIT_SEP);
224-
result.push(rule.getIndex());
224+
result.push(String(rule.getIndex()));
225225
result.push(CosmeticApiCommon.HIT_END);
226226

227227
return result.join('');

0 commit comments

Comments
 (0)