Skip to content

Commit bd998b3

Browse files
committed
remove throwErrorIfNotFound from getConfig - useages
1 parent 92f2060 commit bd998b3

File tree

6 files changed

+8
-15
lines changed

6 files changed

+8
-15
lines changed

client/modules/IDE/actions/project.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ import {
1515
} from './ide';
1616
import { clearState, saveState } from '../../../persistState';
1717

18-
const ROOT_URL = getConfig('API_URL', { throwErrorIfNotFound: true });
19-
const S3_BUCKET_URL_BASE = getConfig('S3_BUCKET_URL_BASE', {
20-
throwErrorIfNotFound: true
21-
});
22-
const S3_BUCKET = getConfig('S3_BUCKET', { throwErrorIfNotFound: true });
18+
const ROOT_URL = getConfig('API_URL');
19+
const S3_BUCKET_URL_BASE = getConfig('S3_BUCKET_URL_BASE');
20+
const S3_BUCKET = getConfig('S3_BUCKET');
2321

2422
export function setProject(project) {
2523
return {

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Frame = styled.iframe`
1313

1414
function PreviewFrame({ fullView, isOverlayVisible }) {
1515
const iframe = useRef();
16-
const previewUrl = getConfig('PREVIEW_URL', { throwErrorIfNotFound: true });
16+
const previewUrl = getConfig('PREVIEW_URL');
1717
useEffect(() => {
1818
const unsubscribe = registerFrame(iframe.current.contentWindow, previewUrl);
1919
return () => {

client/modules/IDE/components/SketchListRowBase.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import MenuItem from '../../../components/Dropdown/MenuItem';
1111
import { formatDateToString } from '../../../utils/formatDate';
1212
import { getConfig } from '../../../utils/getConfig';
1313

14-
const ROOT_URL = getConfig('API_URL', { throwErrorIfNotFound: true });
14+
const ROOT_URL = getConfig('API_URL');
1515

1616
const formatDateCell = (date, mobile = false) =>
1717
formatDateToString(date, { showTime: !mobile });

client/modules/Preview/EmbedFrame.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ p5.prototype.registerMethod('afterSetup', p5.prototype.ensureAccessibleCanvas);`
245245
window.offs = ${JSON.stringify(scriptOffs)};
246246
window.objectUrls = ${JSON.stringify(objectUrls)};
247247
window.objectPaths = ${JSON.stringify(objectPaths)};
248-
window.editorOrigin = '${getConfig('EDITOR_URL', {
249-
throwErrorIfNotFound: true
250-
})}';
248+
window.editorOrigin = '${getConfig('EDITOR_URL')}';
251249
`;
252250
addLoopProtect(sketchDoc);
253251
sketchDoc.head.prepend(consoleErrorsScript);

client/modules/Preview/previewIndex.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ const App = () => {
2424
const [basePath, setBasePath] = useState('');
2525
const [textOutput, setTextOutput] = useState(false);
2626
const [gridOutput, setGridOutput] = useState(false);
27-
registerFrame(
28-
window.parent,
29-
getConfig('EDITOR_URL', { throwErrorIfNotFound: true })
30-
);
27+
registerFrame(window.parent, getConfig('EDITOR_URL'));
3128

3229
function handleMessageEvent(message) {
3330
const { type, payload } = message;

client/utils/apiClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios, { AxiosInstance } from 'axios';
22
import { getConfig } from './getConfig';
33

4-
const ROOT_URL = getConfig('API_URL', { throwErrorIfNotFound: true });
4+
const ROOT_URL = getConfig('API_URL');
55

66
/**
77
* Configures an Axios instance with the correct API URL

0 commit comments

Comments
 (0)