posthog-js 1.231.2 → 1.231.3

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.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-js",
3
- "version": "1.231.2",
3
+ "version": "1.231.3",
4
4
  "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
5
5
  "repository": "https://github.com/PostHog/posthog-js",
6
6
  "author": "hey@posthog.com",
@@ -714,6 +714,10 @@ var PostHog = /** @class */ (function () {
714
714
  logger.critical('This capture call is ignored due to client rate limiting.');
715
715
  return;
716
716
  }
717
+ if ((properties === null || properties === void 0 ? void 0 : properties.$current_url) && !isString(properties === null || properties === void 0 ? void 0 : properties.$current_url)) {
718
+ logger.error('Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value.');
719
+ properties === null || properties === void 0 ? true : delete properties.$current_url;
720
+ }
717
721
  // update persistence
718
722
  this.sessionPersistence.update_search_keyword();
719
723
  // The initial campaign/referrer props need to be stored in the regular persistence, as they are there to mimic