From 4b260b761a78ea1a0dd6b02df7d25e93b496b6ff Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Thu, 12 May 2016 07:50:53 -0400
Subject: Updating client dependancies and ESLint (#2954)

* Updating client dependancies

* Fixing eslint errors with updates

* Updating eslint
---
 webapp/utils/utils.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'webapp/utils/utils.jsx')

diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 2f728226c..1f52bb451 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -457,7 +457,7 @@ export function replaceHtmlEntities(text) {
     };
     var newtext = text;
     for (var tag in tagsToReplace) {
-        if ({}.hasOwnProperty.call(tagsToReplace, tag)) {
+        if (Reflect.apply({}.hasOwnProperty, this, [tagsToReplace, tag])) {
             var regex = new RegExp(tag, 'g');
             newtext = newtext.replace(regex, tagsToReplace[tag]);
         }
@@ -473,7 +473,7 @@ export function insertHtmlEntities(text) {
     };
     var newtext = text;
     for (var tag in tagsToReplace) {
-        if ({}.hasOwnProperty.call(tagsToReplace, tag)) {
+        if (Reflect.apply({}.hasOwnProperty, this, [tagsToReplace, tag])) {
             var regex = new RegExp(tag, 'g');
             newtext = newtext.replace(regex, tagsToReplace[tag]);
         }
@@ -924,7 +924,7 @@ export function isValidUsername(name) {
         error = 'This field is required';
     } else if (name.length < Constants.MIN_USERNAME_LENGTH || name.length > Constants.MAX_USERNAME_LENGTH) {
         error = 'Must be between ' + Constants.MIN_USERNAME_LENGTH + ' and ' + Constants.MAX_USERNAME_LENGTH + ' characters';
-    } else if (!(/^[a-z0-9\.\-\_]+$/).test(name)) {
+    } else if (!(/^[a-z0-9\.\-_]+$/).test(name)) {
         error = "Must contain only letters, numbers, and the symbols '.', '-', and '_'.";
     } else if (!(/[a-z]/).test(name.charAt(0))) { //eslint-disable-line no-negated-condition
         error = 'First character must be a letter.';
@@ -977,7 +977,7 @@ Image.prototype.load = function imageLoad(url, progressCallback) {
     xmlHTTP.responseType = 'arraybuffer';
     xmlHTTP.onload = function onLoad() {
         var h = xmlHTTP.getAllResponseHeaders();
-        var m = h.match(/^Content-Type\:\s*(.*?)$/mi);
+        var m = h.match(/^Content-Type:\s*(.*?)$/mi);
         var mimeType = m[1] || 'image/png';
 
         var blob = new Blob([this.response], {type: mimeType});
@@ -1142,7 +1142,7 @@ export function generateId() {
     // implementation taken from http://stackoverflow.com/a/2117523
     var id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
 
-    id = id.replace(/[xy]/g, function replaceRandom(c) {
+    id = id.replace(/[xy]/g, (c) => {
         var r = Math.floor(Math.random() * 16);
 
         var v;
-- 
cgit v1.2.3-1-g7c22

