@plaidev/karte-action-sdk 1.1.182-28044595.2da1f16a → 1.1.182-28058838.32ec9a3b

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.
@@ -2723,13 +2723,22 @@ const moveTo = (to) => () => {
2723
2723
  };
2724
2724
  /** @internal */
2725
2725
  const linkTo = (to, targetBlank = true) => () => {
2726
- send_event('message_click', { url: to, state: getState$1() });
2726
+ async function sleep(ms) {
2727
+ return new Promise(resolve => setTimeout(resolve, ms));
2728
+ }
2729
+ async function _send() {
2730
+ send_event('message_click', { url: to, state: getState$1() });
2731
+ // # edge.js の retransmitter が送るのを待つ
2732
+ await sleep(450);
2733
+ }
2727
2734
  if (targetBlank) {
2728
2735
  window.open(to);
2729
2736
  }
2730
- else {
2731
- location.href = to;
2732
- }
2737
+ Promise.race([_send(), sleep(650)]).then(() => {
2738
+ if (!targetBlank) {
2739
+ location.href = to;
2740
+ }
2741
+ });
2733
2742
  };
2734
2743
  /** @internal */
2735
2744
  const closeApp = (trigger) => () => {
package/dist/index.es.js CHANGED
@@ -2747,13 +2747,22 @@ const moveTo = (to) => () => {
2747
2747
  };
2748
2748
  /** @internal */
2749
2749
  const linkTo = (to, targetBlank = true) => () => {
2750
- send_event('message_click', { url: to, state: getState$1() });
2750
+ async function sleep(ms) {
2751
+ return new Promise(resolve => setTimeout(resolve, ms));
2752
+ }
2753
+ async function _send() {
2754
+ send_event('message_click', { url: to, state: getState$1() });
2755
+ // # edge.js の retransmitter が送るのを待つ
2756
+ await sleep(450);
2757
+ }
2751
2758
  if (targetBlank) {
2752
2759
  window.open(to);
2753
2760
  }
2754
- else {
2755
- location.href = to;
2756
- }
2761
+ Promise.race([_send(), sleep(650)]).then(() => {
2762
+ if (!targetBlank) {
2763
+ location.href = to;
2764
+ }
2765
+ });
2757
2766
  };
2758
2767
  /** @internal */
2759
2768
  const closeApp = (trigger) => () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.182-28044595.2da1f16a",
3
+ "version": "1.1.182-28058838.32ec9a3b",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",