nodebb-plugin-session-sharing 7.1.3 → 7.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.
- package/library.js +3 -3
- package/package.json +1 -1
package/library.js
CHANGED
|
@@ -54,12 +54,12 @@ const plugin = {
|
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
plugin.defaults = Object.freeze({ ...plugin.settings });
|
|
58
|
-
|
|
59
57
|
payloadKeys.forEach(function (key) {
|
|
60
58
|
plugin.settings['payload:' + key] = key;
|
|
61
59
|
});
|
|
62
60
|
|
|
61
|
+
plugin.defaults = Object.freeze({ ...plugin.settings });
|
|
62
|
+
|
|
63
63
|
plugin.init = async (params) => {
|
|
64
64
|
var router = params.router;
|
|
65
65
|
var hostMiddleware = params.middleware;
|
|
@@ -156,7 +156,7 @@ plugin.normalizePayload = async (payload) => {
|
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
|
|
159
|
-
if (!userData.id) {
|
|
159
|
+
if (!userData.hasOwnProperty('id')) {
|
|
160
160
|
winston.warn('[session-sharing] No user id was given in payload');
|
|
161
161
|
throw new Error('payload-invalid');
|
|
162
162
|
}
|