Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

giphy: Fix live update of giphy icon when API key is empty.

sahil839cf23a09532a7
diff --git a/static/js/giphy.js b/static/js/giphy.js
index d9963d7cae3..601ff9932b6 100644
--- a/static/js/giphy.js
+++ b/static/js/giphy.js
@@ -44,7 +44,10 @@ const APPROX_HEIGHT = 350;
const APPROX_WIDTH = 300;
export function update_giphy_rating() {
- if (page_params.realm_giphy_rating === page_params.giphy_rating_options.disabled.id) {
+ if (
+ page_params.realm_giphy_rating === page_params.giphy_rating_options.disabled.id ||
+ page_params.giphy_api_key === ""
+ ) {
$(".compose_giphy_link").hide();
} else {
$(".compose_giphy_link").show();