Skip to content

Commit

Permalink
Revert change to pathOr that breaks tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Worley committed Mar 9, 2020
1 parent 0c88efe commit d00ee74
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/propOr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _curry3 from './internal/_curry3';
import defaultTo from './defaultTo';
import prop from './prop';

import _curry3 from './internal/_curry3'
import defaultTo from './defaultTo'
import prop from './prop'
import pathOr from './pathOr'

/**
* If the given, non-null object has an own property with the specified name,
Expand Down Expand Up @@ -29,7 +29,7 @@ import prop from './prop';
* favorite(alice); //=> undefined
* favoriteWithDefault(alice); //=> 'Ramda'
*/
var propOr = _curry3(function propOr(val, p, obj) {
return defaultTo(val, prop(p, obj));
});
export default propOr;
var propOr = _curry3(function propOr (val, p, obj) {
return pathOr(val, [p], obj)
})
export default propOr

0 comments on commit d00ee74

Please sign in to comment.