fix rowyRun error when settings doc hasn't loaded in yet

This commit is contained in:
Sidney Alcantara
2022-04-07 18:25:31 +10:00
parent e8a8328756
commit 70a1039281

View File

@@ -376,8 +376,8 @@ export const ProjectContextProvider: React.FC = ({ children }) => {
const { service, ...rest } = args;
const authToken = await getAuthToken();
const serviceUrl = service
? settings.doc.services[service]
: settings.doc.rowyRunUrl;
? settings.doc?.services[service]
: settings.doc?.rowyRunUrl;
if (serviceUrl) {
return rowyRun({