diff --git a/src/StringPrototype.js b/src/StringPrototype.js
index 851d4953..6e4b7bc1 100644
--- a/src/StringPrototype.js
+++ b/src/StringPrototype.js
@@ -2,9 +2,9 @@ if (String.prototype.replaceAll === undefined) {
String.prototype.replaceAll = function (before, after) {
let res = new String(), matched = 0;
for (let i = 0; i < this.length; i += 1) {
- if (this[i] == before[matched]) {
+ if (this[i] === before[matched]) {
matched += 1;
- if (matched == before.length) {
+ if (matched === before.length) {
res += after;
matched = 0;
}
@@ -13,6 +13,11 @@ if (String.prototype.replaceAll === undefined) {
res += this[i];
}
}
+
+ for (let i = this.length - matched; i < this.length; i += 1) {
+ res += this[i];
+ }
+
return res;
};
}
\ No newline at end of file
diff --git a/src/components/user/register.vue b/src/components/user/register.vue
index 2d735a00..7b880e9d 100644
--- a/src/components/user/register.vue
+++ b/src/components/user/register.vue
@@ -14,7 +14,7 @@