Skip to content

Commit

Permalink
Fix #65
Browse files Browse the repository at this point in the history
  • Loading branch information
noahcoolboy committed Oct 5, 2023
1 parent e86b453 commit cec4260
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function getBda(userAgent, opts) {
}
function solveBreaker(v2, breaker = "default", gameType, value) {
if (!v2 && typeof breaker === "string")
return apiBreakers.v1[gameType][breaker || "default"](value);
return (apiBreakers.v1[gameType][breaker || "default"] || ((v) => v))(value);
if (typeof breaker !== "string") {
let b = apiBreakers.v2[gameType];
let v = breaker.value.reduce((acc, cur) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "funcaptcha",
"version": "1.1.5",
"version": "1.1.6",
"description": "A library used to interact with funcaptchas.",
"author": "noahcoolboy",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function getBda(userAgent: string, opts: object): string {

function solveBreaker(v2: boolean, breaker: { value: string[], key: string } | string = "default", gameType: number, value: object) {
if (!v2 && typeof breaker === "string")
return apiBreakers.v1[gameType][breaker || "default"](value)
return (apiBreakers.v1[gameType][breaker || "default"] || ((v: any) => v))(value)

if (typeof breaker !== "string") {
let b = apiBreakers.v2[gameType]
Expand Down

0 comments on commit cec4260

Please sign in to comment.