mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
fixed #1144
This commit is contained in:
@@ -246,7 +246,7 @@ var fs = require('fs'),
|
|||||||
`data.priority`, the relative priority of the method when it is eventually called (default: 10)
|
`data.priority`, the relative priority of the method when it is eventually called (default: 10)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (data.hook && data.method) {
|
if (data.hook && data.method && typeof data.method === 'string' && data.method.length > 0) {
|
||||||
data.id = id;
|
data.id = id;
|
||||||
if (!data.priority) data.priority = 10;
|
if (!data.priority) data.priority = 10;
|
||||||
data.method = data.method.split('.').reduce(function(memo, prop) {
|
data.method = data.method.split('.').reduce(function(memo, prop) {
|
||||||
|
|||||||
Reference in New Issue
Block a user