@funnelsgrove/runtime 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import posthog from 'posthog-js';
2
+ import { runtimePublicConfig } from '../services/public-env.js';
2
3
  let initialized = false;
3
4
  let readyPromise = null;
4
5
  export const POSTHOG_FEATURE_FLAG_READY_TIMEOUT_MS = 2500;
@@ -6,8 +7,8 @@ const STORED_PERSON_PROPERTIES_KEY = '$stored_person_properties';
6
7
  const buildFlagScopeProperties = (config) => {
7
8
  var _a, _b;
8
9
  const properties = {};
9
- const projectId = (_a = config.projectId) === null || _a === void 0 ? void 0 : _a.trim();
10
- const funnelId = (_b = config.funnelId) === null || _b === void 0 ? void 0 : _b.trim();
10
+ const projectId = ((_a = config.projectId) === null || _a === void 0 ? void 0 : _a.trim()) || runtimePublicConfig.projectId;
11
+ const funnelId = ((_b = config.funnelId) === null || _b === void 0 ? void 0 : _b.trim()) || runtimePublicConfig.funnelId;
11
12
  if (projectId) {
12
13
  properties.project_id = projectId;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/runtime",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",