Skip to content

Commit

Permalink
fix(fluencyBuilder): fixes key error
Browse files Browse the repository at this point in the history
  • Loading branch information
m1dugh committed Apr 2, 2024
1 parent cb8bbfd commit 0ec8a3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "RosettaStonks",
"description": "ah oui oui oui",
"version": "2.1.2",
"version": "2.1.3",
"manifest_version": 3,
"background": {
"service_worker": "./dist/workers/background.js"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "rosettastonks",
"version": "2.1.2-BETA",
"version": "2.1.3",
"description": "A performance enhancer for Rosetta stone.",
"main": "dist/bundle.js",
"scripts": {
"build": "npm run build:front && npm run build:workers",
"build:front": "webpack -c webpack.config.front.js",
"build:workers": "webpack -c webpack.config.workers.js",
"build": "npm run build:front && npm run build:workers",
Expand Down
7 changes: 4 additions & 3 deletions src/workers/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const filterObject = {
]
}

const FLUENCY_BUILDER = "fluencyBuilder"
const FLUENCY_BUILDER = "fluency_builder"
const FOUNDATIONS = "foundations"

// forces the request to be dropped if older than 5h
Expand Down Expand Up @@ -110,7 +110,7 @@ chrome.webRequest
// Fluency builder code base.
const filterFluencyBuilder = {
urls: [
"https://gaia-server.rosettastone.com/graphql"
"https://gaia-server.rosettastone.com/*"
]
}

Expand Down Expand Up @@ -143,8 +143,9 @@ function onBeforeRequestFluencyBuilder(endpoint, bodyString, details) {

function onBeforeSendHeadersFluencyBuilder(details) {


chrome.storage.session.get([FLUENCY_BUILDER]).then(({ fluency_builder }) => {
if (fluency_builder?.requestId !== details.requestId) {
if (fluency_builder?.requestId != details.requestId) {
return
}

Expand Down

0 comments on commit 0ec8a3f

Please sign in to comment.