diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 9af022318ef61f3d54579f875002c6b7e5623a21..f0f33a63c811070a24f5f6fb253c674b27ae3f96 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -7919,7 +7919,11 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ } } }; - img.src = getRealPath(option.iconPath); + if (option.iconPath) { + img.src = getRealPath(option.iconPath); + } else { + console.error("Marker.iconPath is required."); + } } function addMarker(props3) { marker = new maps.Marker({ diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index a80ca6bfa4027584a0fa770c35f9a8b2e82fdfaf..ba6b172871139be8e03ba8ab24943a4b5121d3cc 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -15332,7 +15332,11 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ } } }; - img.src = getRealPath(option.iconPath); + if (option.iconPath) { + img.src = getRealPath(option.iconPath); + } else { + console.error("Marker.iconPath is required."); + } } function addMarker(props3) { marker = new maps2.Marker({ diff --git a/packages/uni-h5/src/view/components/map/MapMarker.tsx b/packages/uni-h5/src/view/components/map/MapMarker.tsx index 9a5915f6382109b9f47e9709cf2624c3020b1ebc..35312b45f0fc6aa57ea70cf8e957ad7136729268 100644 --- a/packages/uni-h5/src/view/components/map/MapMarker.tsx +++ b/packages/uni-h5/src/view/components/map/MapMarker.tsx @@ -254,7 +254,11 @@ export default /*#__PURE__*/ defineSystemComponent({ } } } - img.src = getRealPath(option.iconPath) + if (option.iconPath) { + img.src = getRealPath(option.iconPath) + } else { + console.error('Marker.iconPath is required.') + } } function addMarker(props: Props) { marker = new maps.Marker({