@tarojs/taro-h5 3.6.24-nightly.8 → 3.6.24-patch.0

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.
package/dist/index.esm.js CHANGED
@@ -2910,16 +2910,16 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
2910
2910
  * 打开地图选择位置。
2911
2911
  */
2912
2912
  const chooseLocation = ({ success, fail, complete, mapOpts } = {}) => {
2913
- const key = LOCATION_APIKEY;
2914
2913
  const handle = new MethodHandler({ name: 'chooseLocation', success, fail, complete });
2915
2914
  return new Promise((resolve, reject) => {
2916
2915
  const chooseLocation = {};
2917
- if (!key) {
2916
+ if (typeof LOCATION_APIKEY === 'undefined') {
2918
2917
  console.warn('chooseLocation api 依赖腾讯地图定位api,需要在 defineConstants 中配置 LOCATION_APIKEY');
2919
2918
  return handle.fail({
2920
2919
  errMsg: 'LOCATION_APIKEY needed'
2921
2920
  }, { resolve, reject });
2922
2921
  }
2922
+ const key = LOCATION_APIKEY;
2923
2923
  const onMessage = event => {
2924
2924
  // 接收位置信息,用户选择确认位置点后选点组件会触发该事件,回传用户的位置信息
2925
2925
  const loc = event.data;