Skip to content

Commit

Permalink
Fix evaluation of predef option when it's an object. Closes gruntjsGH-41
Browse files Browse the repository at this point in the history
.
  • Loading branch information
xzyfer authored and shama committed Apr 9, 2013
1 parent c7e17e7 commit d8d127d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.4.3:
date: 2013-04-08
changes:
- Fix evaluation of predef option when it's an object.
v0.4.2:
date: 2013-04-08
changes:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ grunt.initConfig({

## Release History

* 2013-04-08   v0.4.3   Fix evaluation of predef option when it's an object.
* 2013-04-08   v0.4.2   Avoid wiping force option when jshintrc is used.
* 2013-04-06   v0.4.1   Fix to allow object type for deprecated predef.
* 2013-04-04   v0.4.0   Revert task level options to override jshintrc files.
Expand All @@ -148,4 +149,4 @@ grunt.initConfig({

Task submitted by ["Cowboy" Ben Alman](http://benalman.com/)

*This file was generated on Mon Apr 08 2013 14:53:42.*
*This file was generated on Mon Apr 08 2013 21:43:19.*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-jshint",
"description": "Validate files with JSHint.",
"version": "0.4.2",
"version": "0.4.3",
"homepage": "https://github.com/gruntjs/grunt-contrib-jshint",
"author": {
"name": "Grunt Team",
Expand Down
2 changes: 1 addition & 1 deletion tasks/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(grunt) {
}
// Convert deprecated "predef" array|object into globals.
if (options.predef) {
if (options.predef === Object(options.predef)) {
if (!Array.isArray(options.predef) && typeof options.predef === "object") {
options.predef = Object.keys(options.predef);
}
options.predef.forEach(function(key) {
Expand Down

0 comments on commit d8d127d

Please sign in to comment.