Skip to content

Commit

Permalink
make empty option displayed only on empty options
Browse files Browse the repository at this point in the history
  • Loading branch information
stuk88 committed Nov 13, 2022
1 parent f836688 commit e1b1981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jade-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = function(sails) {
return row;
});

if(!_.isUndefined(attr))
if(!_.isUndefined(attr) && _.isUndefined(options))
{
let AttributeName = _.get(attr, "cms.label", false) || attr.collection || attr.model;
options.unshift({value: null, title: 'Without '+ AttributeName })
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sails-hook-cms",
"version": "0.0.22",
"version": "0.0.23",
"description": "A simple sails v0.12 admin panel",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e1b1981

Please sign in to comment.