Browse Source

added comment

pull/4023/head
Michael Shanks 6 years ago
parent
commit
c336605529
  1. 4
      packages/builder/src/components/start/CreateAppModal.svelte

4
packages/builder/src/components/start/CreateAppModal.svelte

@ -28,8 +28,10 @@
const validateApiKey = async apiKey => {
if (!apiKey) return false
// make sure we only fetch once
// make sure we only fetch once, unless API Key is changed
if (isApiKeyValid === undefined || apiKey !== lastApiKey) {
// svelte reactivity was causing a requst to get fired mutiple times
// so, we make everything await the same promise, if one exists
if (!fetchApiKeyPromise) {
fetchApiKeyPromise = analytics.identifyByApiKey(apiKey)
}

Loading…
Cancel
Save