Commit 7d13eaf1 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Redefine valores globales, evita eval

parent f07ec3bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ define([], function() {
		var variableValue;

		try {
			variableValue = eval(variableName);
			variableValue = window[variableName];
		} catch(e) {
			console.warn('Tried to get undefined global variable "%s"', variableName);
			variableValue = '';
+6 −5
Original line number Diff line number Diff line
@@ -9,16 +9,17 @@ html
		meta(name = 'robots' content = 'index, follow')

		script.
			let lang = '#{env.lang}',
			var lang = '#{env.lang}',
				envApiUrl = '#{env.apiUrl}',
				envProduction = '#{env.production}',
				envVersion = '#{env.version}',
				envDebug = '#{env.debug}';

		-
			let esLocale = 'es_ES',
				enLocale = 'en_GB',
				locale, altLocale1;
			const esLocale = 'es_ES',
				enLocale = 'en_GB';

			let locale, altLocale1;

			if (env.lang === 'es') {
				locale = esLocale;
@@ -28,7 +29,7 @@ html
				altLocale1 = esLocale;
			}

			let basePath = '/' + (env.useBuilt ? 'dist' : 'public'),
			const basePath = '/' + (env.useBuilt ? 'dist' : 'public'),
				jsPath = basePath + '/javascript/';

		meta(name = 'og:locale' content = locale)