From bcf157a1a9597595c61b1cce84bd62f63fcaa90b Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 16 Jul 2018 16:42:52 +0200 Subject: [PATCH] Avoid loading rails-ujs twice on vanilla flavour --- app/javascript/core/common.js | 3 --- app/javascript/flavours/glitch/packs/common.js | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/core/common.js b/app/javascript/core/common.js index a7073ef0eb9..3b038ca40cd 100644 --- a/app/javascript/core/common.js +++ b/app/javascript/core/common.js @@ -1,8 +1,5 @@ // This file will be loaded on all pages, regardless of theme. -import { start } from 'rails-ujs'; import 'font-awesome/css/font-awesome.css'; require.context('../images/', true); - -start(); diff --git a/app/javascript/flavours/glitch/packs/common.js b/app/javascript/flavours/glitch/packs/common.js index 8dd4372bc4c..94a4e6ee4e6 100644 --- a/app/javascript/flavours/glitch/packs/common.js +++ b/app/javascript/flavours/glitch/packs/common.js @@ -1,3 +1,7 @@ +import { start } from 'rails-ujs'; + +start(); + import 'flavours/glitch/styles/index.scss'; // This ensures that webpack compiles our images.