nodebb-plugin-simple-contact 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/library.js +15 -2
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -160,12 +160,25 @@ async function deleteRequest(req, res) {
160
160
  }
161
161
 
162
162
  ContactPlugin.addNavigation = async function (header) {
163
- header.navigation.push({ route: '/contact', iconClass: 'fa-envelope', text: 'צור קשר' });
163
+ if (header && Array.isArray(header.navigation)) {
164
+ header.navigation.push({
165
+ route: '/contact',
166
+ iconClass: 'fa-envelope',
167
+ text: 'צור קשר',
168
+ title: 'צור קשר'
169
+ });
170
+ }
164
171
  return header;
165
172
  };
166
173
 
167
174
  ContactPlugin.addAdminNavigation = async function (header) {
168
- header.plugins.push({ route: '/plugins/contact', icon: 'fa-envelope', name: 'פניות צור קשר' });
175
+ if (header && Array.isArray(header.plugins)) {
176
+ header.plugins.push({
177
+ route: '/plugins/contact',
178
+ icon: 'fa-envelope',
179
+ name: 'פניות צור קשר'
180
+ });
181
+ }
169
182
  return header;
170
183
  };
171
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-simple-contact",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "תוסף טופס צור קשר עם התראות למנהלים וניהול פניות",
5
5
  "main": "library.js",
6
6
  "nbbpm": {