glitch-javascript-sdk 1.0.1 → 1.0.2

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.
@@ -37,7 +37,7 @@ declare class Config {
37
37
  */
38
38
  static setCommunity(community: Record<string, any>): void;
39
39
  /**
40
- * Sets the root level domain so data can accessed across
40
+ * Sets the root level domain so data can be accessed across
41
41
  * multiple subdomains
42
42
  *
43
43
  * @param domain The domain ie: example.com
package/dist/esm/index.js CHANGED
@@ -5716,12 +5716,16 @@ var Config = /** @class */ (function () {
5716
5716
  LabelManager.initialize(community);
5717
5717
  };
5718
5718
  /**
5719
- * Sets the root level domain so data can accessed across
5719
+ * Sets the root level domain so data can be accessed across
5720
5720
  * multiple subdomains
5721
5721
  *
5722
5722
  * @param domain The domain ie: example.com
5723
5723
  */
5724
5724
  Config.setRootDomain = function (domain) {
5725
+ if (!domain) {
5726
+ console.error("setRootDomain: domain is undefined or null");
5727
+ return;
5728
+ }
5725
5729
  var parts = domain.split('.');
5726
5730
  if (parts.length > 2) {
5727
5731
  parts.shift();