@lark-apaas/miaoda-presets 1.0.8 → 1.0.9

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.
@@ -177,11 +177,6 @@ async function copyToClipboard(text) {
177
177
  function render() {
178
178
  ensureRootExists(function () {
179
179
  removeAllChildren(root);
180
- const getEnvOrigin = () => {
181
- return typeof process !== 'undefined' && process.env
182
- ? process.env.FORCE_FRAMEWORK_DOMAIN_MAIN
183
- : undefined;
184
- };
185
180
  const getLegacyParentOrigin = () => {
186
181
  const currentOrigin = window.location?.origin || '';
187
182
  if (currentOrigin.includes('force.feishuapp.net')) {
@@ -203,7 +198,7 @@ function render() {
203
198
  };
204
199
  // 发送 postMessage
205
200
  const sendPostMessage = (message, targetOrigin) => {
206
- const parentOrigin = getEnvOrigin() || getLegacyParentOrigin();
201
+ const parentOrigin = process?.env?.FORCE_FRAMEWORK_DOMAIN_MAIN || getLegacyParentOrigin();
207
202
  const origin = targetOrigin || parentOrigin;
208
203
  window.parent.postMessage(message, origin);
209
204
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-presets",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "files": [
5
5
  "lib"
6
6
  ],
@@ -62,5 +62,5 @@
62
62
  "react": ">=16.14.0",
63
63
  "react-dom": ">=16.14.0"
64
64
  },
65
- "gitHead": "68657b650e5f2343843850323db2b3beae697ace"
65
+ "gitHead": "c4a62d1944234bf2ccc11d51a99be7857c4446d8"
66
66
  }