diff --git a/index.html b/index.html index 852c507..2cce9f2 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ FlutterFlow Custom Code Connect - + diff --git a/public/favicon-brand-v2.svg b/public/favicon-brand-v2.svg new file mode 100644 index 0000000..4a9a059 --- /dev/null +++ b/public/favicon-brand-v2.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index 958a8b3..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/src/reviewPresentation.js b/src/reviewPresentation.js index 0972150..79702ee 100644 --- a/src/reviewPresentation.js +++ b/src/reviewPresentation.js @@ -35,7 +35,15 @@ function asArray(value) { } function parseScore(value) { - const direct = Number(toObject(value).value ?? value); + const scoreValue = toObject(value).value ?? value; + if ( + scoreValue == null + || (typeof scoreValue === "string" && scoreValue.trim() === "") + ) { + return null; + } + + const direct = Number(scoreValue); if (Number.isFinite(direct)) return direct; const match = String(value || "").match(/\bscore\b[^\d]{0,12}(\d{1,3})(?:\s*\/\s*100)?/i); return match ? Number(match[1]) : null; diff --git a/src/reviewPresentation.test.js b/src/reviewPresentation.test.js index 48eb54b..b248d23 100644 --- a/src/reviewPresentation.test.js +++ b/src/reviewPresentation.test.js @@ -142,3 +142,16 @@ test("extracts a prominent score from legacy markdown reviews", () => { assert.equal(presentation.score, 74); }); + +test("leaves structured reviews without score fields unscored", () => { + const presentation = buildReviewPresentation({ + bundle, + reviewResult: { + status: "warning", + summary: "Review completed without a numeric score.", + artifacts: [], + }, + }); + + assert.equal(presentation.score, null); +});