diff --git a/.gitignore b/.gitignore index 386c235..afb5f62 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ sftp-config.json *.sublime-workspace .idea .vscode +node_modules diff --git a/library.js b/library.js index 2a45c43..4455671 100644 --- a/library.js +++ b/library.js @@ -1,6 +1,6 @@ 'use strict'; -var S = require.main.require('string'); +var S = require('string'); var meta = module.parent.require('./meta'); var user = module.parent.require('./user'); @@ -108,7 +108,7 @@ library.addUserToTopic = function(data, callback) { if (err) { return callback(err); } - + data.templateData.loggedInUser = userdata; callback(null, data); }); diff --git a/package.json b/package.json index 557fed0..eeac291 100644 --- a/package.json +++ b/package.json @@ -37,5 +37,8 @@ "license": "BSD-2-Clause", "bugs": { "url": "https://github.com/psychobunny/nodebb-theme-persona/issues" + }, + "dependencies": { + "string": "^3.3.3" } }