nodebb-plugin-poll 3.0.3 → 3.0.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/lib/poll.js CHANGED
@@ -132,6 +132,9 @@ const Scheduler = require('./scheduler');
132
132
  if (err) {
133
133
  return callback(err);
134
134
  }
135
+ // sort options according to option id. option id are supposed to preseve the order as in Poll.add(),
136
+ // when the user create the poll
137
+ options.sort((a, b) => a - b);
135
138
  async.map(options, (option, next) => {
136
139
  Poll.getOption(pollId, option, withVotes, next);
137
140
  }, callback);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-poll",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "NodeBB Poll Plugin",
5
5
  "main": "library.js",
6
6
  "scripts": {
@@ -249,6 +249,7 @@
249
249
  app.parseAndTranslate('poll/view/details', details, function (html) {
250
250
  bootbox.dialog({
251
251
  message: html,
252
+ backdrop: true,
252
253
  buttons: {
253
254
  close: {
254
255
  label: 'Close',