fix(ApiModal): fix null assertion on tabs array

fix(ApiModal): fix strict mode in tsconfig.json to enable strict type checking
This commit is contained in:
anovazzi1 2023-08-16 17:45:12 -03:00
commit 9b0ff166c9
2 changed files with 6 additions and 6 deletions

View file

@ -157,10 +157,10 @@ const ApiModal = forwardRef(
const pythonCode = getPythonCode(flow, tweak.current, tabsState);
const widgetCode = getWidgetCode(flow, tabsState);
tabs[0].code = curl_code;
tabs[1].code = pythonApiCode;
tabs[2].code = pythonCode;
tabs[3].code = widgetCode;
tabs![0].code = curl_code;
tabs![1].code = pythonApiCode;
tabs![2].code = pythonCode;
tabs![3].code = widgetCode;
setTweak(tweak.current);
}
@ -214,7 +214,7 @@ const ApiModal = forwardRef(
<BaseModal.Content>
<CodeTabsComponent
flow={flow}
tabs={tabs}
tabs={tabs!}
activeTab={activeTab}
setActiveTab={setActiveTab}
tweaks={{

View file

@ -6,7 +6,7 @@
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",