@syncfusion/ej2-base 31.2.12 → 31.2.18

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.
@@ -43,7 +43,8 @@ function setImmediate(handler) {
43
43
  }
44
44
  };
45
45
  window.addEventListener('message', messageHandler, false);
46
- window.postMessage(secret, window.location.origin);
46
+ const origin = window.location.origin.indexOf('file://') === 0 ? '*' : window.location.origin;
47
+ window.postMessage(secret, origin);
47
48
  return unbind = () => {
48
49
  window.removeEventListener('message', messageHandler);
49
50
  handler = messageHandler = secret = undefined;
@@ -7092,11 +7093,15 @@ function convertToChar(cArr) {
7092
7093
  * @returns {void}
7093
7094
  */
7094
7095
  function registerLicense(key) {
7095
- key = window.syncfusionLicenseKey ? window.syncfusionLicenseKey : key;
7096
+ if (typeof window !== 'undefined') {
7097
+ key = window.syncfusionLicenseKey ? window.syncfusionLicenseKey : key;
7098
+ }
7096
7099
  licenseValidator = new LicenseValidator(key);
7097
7100
  }
7098
7101
  const validateLicense = (component, key) => {
7099
- key = window.syncfusionLicenseKey ? window.syncfusionLicenseKey : key;
7102
+ if (typeof window !== 'undefined') {
7103
+ key = window.syncfusionLicenseKey ? window.syncfusionLicenseKey : key;
7104
+ }
7100
7105
  if (key) {
7101
7106
  registerLicense(key);
7102
7107
  }