page_params: Throw an error if params are missing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-09-19 21:58:12 -07:00 committed by Tim Abbott
parent dea6889956
commit 6b09e690f1
1 changed files with 3 additions and 0 deletions

View File

@ -1 +1,4 @@
window.page_params = $("#page-params").remove().data("params");
if (!window.page_params) {
throw new Error("Missing page-params");
}