Use strict mode in JavaScript
Strict mode is supported by 98% of the browsers, including Internet Explorer 10, and it helps developers avoid common JavaScript pitfalls.
This commit is contained in:
@@ -88,6 +88,8 @@
|
||||
//= require votations
|
||||
|
||||
var initialize_modules = function() {
|
||||
"use strict";
|
||||
|
||||
App.Answers.initialize();
|
||||
App.Questions.initialize();
|
||||
App.Comments.initialize();
|
||||
@@ -141,6 +143,8 @@ var initialize_modules = function() {
|
||||
};
|
||||
|
||||
$(function(){
|
||||
"use strict";
|
||||
|
||||
Turbolinks.enableProgressBar();
|
||||
|
||||
$(document).ready(initialize_modules);
|
||||
|
||||
Reference in New Issue
Block a user