Skip to content

Commit

Permalink
Simplify not-null-or-undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
joliss committed May 20, 2013
1 parent 76b93ba commit caa2753
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"undef": true,
"sub": true,
"strict": false,
"white": false
"white": false,
"eqnull": true
}
2 changes: 1 addition & 1 deletion packages/ember-data/lib/serializers/fixture_serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DS.FixtureSerializer = DS.Serializer.extend({

extractBelongsTo: function(type, hash, key) {
var val = hash[key];
if (val !== null && val !== undefined) {
if (val != null) {
val = val + '';
}
return val;
Expand Down

0 comments on commit caa2753

Please sign in to comment.