diff --git a/app/assets/javascripts/discourse/lib/utilities.js b/app/assets/javascripts/discourse/lib/utilities.js index 70256c67f92..d5d58f7e62e 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js +++ b/app/assets/javascripts/discourse/lib/utilities.js @@ -314,7 +314,7 @@ Discourse.Utilities = { @returns {Promise} a promise that will eventually be the cropped avatar. **/ cropAvatar: function(url) { - const extension = /\.(\w{2,})$/.exec(url)[1]; + var extension = /\.(\w{2,})$/.exec(url)[1]; if (Discourse.SiteSettings.allow_animated_avatars && extension === "gif") { // can't crop animated gifs... let the browser stretch the gif return Ember.RSVP.resolve(url); diff --git a/plugins/poll/assets/javascripts/poll_dialect.js b/plugins/poll/assets/javascripts/poll_dialect.js index 87df9056180..405b8ee85fe 100644 --- a/plugins/poll/assets/javascripts/poll_dialect.js +++ b/plugins/poll/assets/javascripts/poll_dialect.js @@ -2,12 +2,12 @@ (function() { - const DATA_PREFIX = "data-poll-"; - const DEFAULT_POLL_NAME = "poll"; + var DATA_PREFIX = "data-poll-"; + var DEFAULT_POLL_NAME = "poll"; - const WHITELISTED_ATTRIBUTES = ["type", "name", "min", "max", "step", "order", "status"]; + var WHITELISTED_ATTRIBUTES = ["type", "name", "min", "max", "step", "order", "status"]; - const ATTRIBUTES_REGEX = new RegExp("(" + WHITELISTED_ATTRIBUTES.join("|") + ")=['\"]?[^\\s\\]]+['\"]?", "g"); + var ATTRIBUTES_REGEX = new RegExp("(" + WHITELISTED_ATTRIBUTES.join("|") + ")=['\"]?[^\\s\\]]+['\"]?", "g"); Discourse.Dialect.replaceBlock({ start: /\[poll((?:\s+\w+=[^\s\]]+)*)\]([\s\S]*)/igm,