hotkey_actions["collapse_article"] = function() {
var id = getActiveArticleId();
var elem = $("CICD-"+id);
- if(elem.visible()) {
- cdmCollapseArticle(null, id);
- }
- else {
- cdmExpandArticle(id);
+
+ if (elem) {
+ if (elem.visible()) {
+ cdmCollapseArticle(null, id);
+ }
+ else {
+ cdmExpandArticle(id);
+ }
}
};
hotkey_actions["toggle_expand"] = function() {
var id = getActiveArticleId();
var elem = $("CICD-"+id);
- if(elem.visible()) {
- cdmCollapseArticle(null, id, false);
- }
- else {
- cdmExpandArticle(id);
+
+ if (elem) {
+ if (elem.visible()) {
+ cdmCollapseArticle(null, id, false);
+ }
+ else {
+ cdmExpandArticle(id);
+ }
}
};
hotkey_actions["search_dialog"] = function() {