Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
typeahead: Replace substring with slice.
evykassirer827b42dd9f47
diff --git a/web/third/bootstrap-typeahead/typeahead.js b/web/third/bootstrap-typeahead/typeahead.jsindex 2e746be4740..0ca9ddd3858 100644--- a/web/third/bootstrap-typeahead/typeahead.js+++ b/web/third/bootstrap-typeahead/typeahead.js@@ -198,7 +198,7 @@ import {get_string_diff} from "../../src/util";this.$element.val(),after_text,);- const replacement = after_text.substring(from, to_after);+ const replacement = after_text.slice(from, to_after);// select / highlight the minimal text to be replacedthis.$element[0].setSelectionRange(from, to_before);insertTextIntoField(this.$element[0], replacement);