Prevent Google maps JS executing multiple times caused by Rails Turbolinks

前端 未结 5 1297
盖世英雄少女心
盖世英雄少女心 2021-02-19 07:30

I\'m currently working on Rails app that is getting the following error:

You have included the Google Maps API multiple times on this page. This may ca

5条回答
  •  悲&欢浪女
    2021-02-19 08:18

    adding data-turbolinks-eval=false to the script tag solves the problem

    See the docks of the turbolinks gem for more details https://github.com/turbolinks/turbolinks-classic#evaluating-script-tags

提交回复
热议问题