diff --git a/lib/session.js b/lib/session.js index 24298f5..70d8d69 100644 --- a/lib/session.js +++ b/lib/session.js @@ -271,7 +271,7 @@ class LocalSession { function _initDB () { // Use ID based resources, so we can query records by ID (ex.: getById(), removeById(), ...) - this.DB._.mixin(require('./lodash-id')) + this.DB._.mixin(require('./lodash-id.js')) // If database is empty, fill it with empty Array of sessions and optionally with initial state this.DB.defaults(Object.assign({ sessions: [] }, this.options.state)).write() debug('Initiating finished') @@ -286,7 +286,6 @@ function isPromise (obj) { /** * @overview {@link http://telegraf.js.org/|Telegraf} Session middleware for storing sessions locally (Memory/FileSync/FileAsync/...) * @module telegraf-session-local - * @version 1.0.0 * @license MIT * @author Tema Smirnov * @requires {@link https://www.npmjs.com/package/telegraf|npm: telegraf} diff --git a/tests/lodash-id.js b/tests/lodash-id.js index cc0d286..07610a5 100644 --- a/tests/lodash-id.js +++ b/tests/lodash-id.js @@ -1,7 +1,7 @@ const should = require('should'), // debug = require('debug')('telegraf:session-local:test'), - _db = require('../lib/lodash-id') + _db = require('../lib/lodash-id.js') describe('lodash + lodash-id', () => { let db