From 6dc30d5287266e5660e035e5fa1783d43bffd247 Mon Sep 17 00:00:00 2001 From: MinusGix Date: Sun, 13 Jan 2019 16:08:16 -0600 Subject: Change verifyNickname to es5 rather than es6. We're not really using much es6 features, so we might as well make this a normal function so that people with browsers that are old due to not being able to update them (such as apple devices not getting updates the os after end of life). Also replaces the `const` with a `var` since it doesn't really matter if it's modified or not and that is an es6 feature was well. This might fix https://github.com/hack-chat/main/issues/33 or at least the issues 'CheekyChops' having. I didn't test this code, but it's such a simple change. --- client/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client.js b/client/client.js index 60d9c24..cf6a2e8 100644 --- a/client/client.js +++ b/client/client.js @@ -7,7 +7,9 @@ * */ -const verifyNickname = (nick) => /^[a-zA-Z0-9_]{1,24}$/.test(nick); +var verifyNickname = function (nick) { + return /^[a-zA-Z0-9_]{1,24}$/.test(nick); +} var frontpage = [ " _ _ _ _ ", -- cgit v1.2.1