From 0f57245f0c81fe00ecedbb39c1e93fc48ef55099 Mon Sep 17 00:00:00 2001 From: Bryce Johnson Date: Fri, 7 Oct 2016 11:57:49 +0200 Subject: [PATCH] Use native dom in dispatcher field error init. --- app/assets/javascripts/dispatcher.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 956e6085bfb..846884ea793 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -296,9 +296,10 @@ }; Dispatcher.prototype.initFieldErrors = function() { - $('form.show-gl-field-errors').each(function(i, form) { - new gl.GlFieldErrors(form); - }); + return document.querySelectorAll('.show-gl-field-errors') + .forEach(function(form) { + new gl.GlFieldErrors(form); + }); }; return Dispatcher;