stream_edit: Fix error handling for unchanged stream name.

We were incorrectly passing a string version of an integer ID,
e.g. "10", to a function expecting an integer, e.g. 10.  Fix this by
using the common get_stream_id function intended for the purpose
rather than hand-written parsing.

This was likely broken in the recent Dict -> IntDict/Map migrations.
This commit is contained in:
Tim Abbott 2020-02-24 23:43:52 -08:00
parent 27edc18330
commit 324b5052c6
1 changed files with 1 additions and 1 deletions

View File

@ -400,7 +400,7 @@ function change_stream_privacy(e) {
exports.change_stream_name = function (e) {
e.preventDefault();
const sub_settings = $(e.target).closest('.subscription_settings');
const stream_id = $(e.target).closest(".subscription_settings").attr("data-stream-id");
const stream_id = get_stream_id(e.target);
const new_name_box = sub_settings.find('.stream-name-editable');
const new_name = $.trim(new_name_box.text());
$(".stream_change_property_info").hide();