收藏
回答

send-coupon 报错导致渲染失败?

插件:send-coupon

版本:1.4.5

报错:

MiniProgramError
null is not an object (evaluating 't.top')
TypeError: null is not an object (evaluating 't.top')
at  (wxf3f436ba9bd4be7b/appservice.js:1413:956)
at  (WAServiceMainContext.js:1:1560266)
at <SelectorQuery callback function>
at forEach (native code)
at  (WAServiceMainContext.js:1:1560503)
at  (WAServiceMainContext.js:1:1556882)
at  (WASubContext.js:1:399194)
at pe (WASubContext.js:1:279740)
at de (WASubContext.js:1:279633)
at  (WASubContext.js:1:280409)
at  (WAServiceMainContext.js:1:643027)
at emit (WAServiceMainContext.js:1:102447)
at emit (native code)
at dispatch (WAServiceMainContext.js:1:114338)
at cb (WAServiceMainContext.js:1:114879)
at cb (native code)
at emit (WAServiceMainContext.js:1:101819)
at subscribeHandler (WAServiceMainContext.js:1:110175)
global code@


我这边也是偶现的,没法给复现。希望帮看下这段

null is not an object (evaluating 't.top'



到底是哪个对象没有取到?这里的内部逻辑是怎样的?我才好判断是哪里出了问题



    <send-coupon
      data-adsData="{{value}}" 
      bind:sendcoupon="getcoupon" 
      bind:userconfirm="jump"
      send_coupon_params="{{value.ads.coupon_params.send_coupon_params || []}}" 
      sign="{{value.ads.coupon_params.sign || ''}}" 
      send_coupon_merchant="{{value.ads.coupon_params.send_coupon_merchant || ''}}" 
      wx:if="{{ showBanner && !value.is_gdt && value.ads.scenario_type === 'bannerCoupon' && value.ads.creative.url}}"
    >
       <image 
        src="{{value.ads.creative.url ? value.ads.creative.url: ''}}"
        data-clickType="MateNPMBannerCouponClick" 
        data-adsData="{{value}}" 
        data-params="{{params}}" 
        data-keyAds="ads" 
        class="banner-coupon-img
        mode="widthFix" 
        bindload="adLoad" 
        binderror="adError"
      />
      </send-coupon>
回答关注问题邀请回答
收藏
登录 后发表内容