Skip to content

Commit 745fbbc

Browse files
committed
fix: ensure getRootState is a function
1 parent fed1b8c commit 745fbbc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/kahoot-antibot.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:ja Kーアンチボット
44
// @namespace http://tampermonkey.net/
55
// @homepage https://theusaf.org
6-
// @version 4.2.3
6+
// @version 4.2.4
77
// @icon https://cdn.discordapp.com/icons/641133408205930506/31c023710d468520708d6defb32a89bc.png
88
// @description Remove all bots from a kahoot game.
99
// @description:es eliminar todos los bots de un Kahoot! juego.
@@ -1473,7 +1473,7 @@ function scanElements(...args) {
14731473
const KANTIBOT_HOOKS = {
14741474
options: {
14751475
prop: "store",
1476-
condition: (_, value) => true,
1476+
condition: (_, value) => typeof value?.getState === "function",
14771477
callback: (_, value) => {
14781478
kantibotData.kahootInternals.methods.getRootState = value.getState;
14791479
return true;

src/kahoot-antibot.user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:ja Kーアンチボット
44
// @namespace http://tampermonkey.net/
55
// @homepage https://theusaf.org
6-
// @version 4.2.3
6+
// @version 4.2.4
77
// @icon https://cdn.discordapp.com/icons/641133408205930506/31c023710d468520708d6defb32a89bc.png
88
// @description Remove all bots from a kahoot game.
99
// @description:es eliminar todos los bots de un Kahoot! juego.
@@ -1779,7 +1779,7 @@ function scanElements(...args: unknown[]) {
17791779
const KANTIBOT_HOOKS: Record<string, KAntibotHook> = {
17801780
options: {
17811781
prop: "store",
1782-
condition: (_, value) => true,
1782+
condition: (_, value) => typeof value?.getState === "function",
17831783
callback: (_, value) => {
17841784
kantibotData.kahootInternals.methods.getRootState = value.getState;
17851785
return true;

0 commit comments

Comments
 (0)