@@ -40,6 +40,8 @@ function map(resultSet, maps, mapId, columnPrefix) {
4040 * @throws {NotFoundError } if object is not found and isRequired is true
4141 */
4242function mapOne ( resultSet , maps , mapId , columnPrefix , isRequired ) {
43+
44+ // Set up a default value for isRequired
4345 if ( isRequired === undefined ) {
4446 isRequired = true ;
4547 }
@@ -68,8 +70,8 @@ function mapOne(resultSet, maps, mapId, columnPrefix, isRequired) {
6870 */
6971function injectResultInCollection ( result , mappedCollection , maps , mapId , columnPrefix ) {
7072
71- // Make sure there is a columnPrefix
72- if ( ! columnPrefix ) {
73+ // Set up a default value for columnPrefix
74+ if ( columnPrefix === undefined ) {
7375 columnPrefix = '' ;
7476 }
7577
@@ -99,6 +101,11 @@ function injectResultInCollection(result, mappedCollection, maps, mapId, columnP
99101 */
100102function injectResultInObject ( result , mappedObject , maps , mapId , columnPrefix ) {
101103
104+ // Set up a default value for columnPrefix
105+ if ( columnPrefix === undefined ) {
106+ columnPrefix = '' ;
107+ }
108+
102109 // Get the resultMap for this object
103110 let resultMap = _ . find ( maps , 'mapId' , mapId ) ;
104111
0 commit comments