nodebb-plugin-pdf-secure2 1.3.2 → 1.3.3

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 +3 -1
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -232,7 +232,9 @@ plugin.filterMetaTags = async (hookData) => {
232
232
 
233
233
  // Inject allowed categories into client-side config
234
234
  plugin.filterConfig = async function (data) {
235
- data.config.pdfSecureCategories = pluginSettings.allowedCategories || '';
235
+ if (data && data.config) {
236
+ data.config.pdfSecureCategories = pluginSettings.allowedCategories || '';
237
+ }
236
238
  return data;
237
239
  };
238
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-pdf-secure2",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Secure PDF viewer plugin for NodeBB - prevents downloading, enables canvas-only rendering with Premium group support",
5
5
  "main": "library.js",
6
6
  "repository": {