• Resolved matsmotojp

    (@matsmotojp)


    Lightningテーマと合わせてお世話になっています。

    バージョンは、Lightningが3.0.2、VkExUnitが5.2.9です。

    ソーシャルメディア連携のソーシャルボタン表示機能をONすると、まだFacebookで一件もシェアされていない記事を表示した際にJavaScriptのエラーが発生してしまい困っています。

    Google Chromeのコンソールで確認したところ以下のように表示されました。

    all.min.js?ver=5.2.9:4 Uncaught TypeError: Cannot read property ‘share_count’ of undefined
    at Object.success (all.min.js?ver=5.2.9:4)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at HTMLScriptElement.b.onload.b.onreadystatechange (jquery.js?ver=1.12.4:4)

    そこで、エラーメッセージを参考に、all.jsの202行目を、
    if( response.share.share_count === undefined ) return;
    から
    if( !response.share || response.share.share_count === undefined ) return;
    に変更してall.min.jsにリネームしてみたところエラーが発生しなくなりました。

    もし可能でしたら、次バージョンでの修正候補としてご検討頂けませんでしょうか?
    どうぞよろしくお願いいたします。

    • This topic was modified 7 years, 11 months ago by matsmotojp.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ソーシャルメディア連携利用時のJavaScriptのエラーについて’ is closed to new replies.