File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,8 +132,10 @@ the specific language governing permissions and limitations under the Apache Lic
132132 if ( a === b ) return true ;
133133 if ( a === undefined || b === undefined ) return false ;
134134 if ( a === null || b === null ) return false ;
135- if ( a . constructor === String ) return a + '' === b + '' ; // IE requires a+'' instead of just a
136- if ( b . constructor === String ) return b + '' === a + '' ; // IE requires b+'' instead of just b
135+ // Check whether 'a' or 'b' is a string (primitive or object).
136+ // The concatenation of an empty string (+'') converts its argument to a string's primitive.
137+ if ( a . constructor === String ) return a + '' === b + '' ; // a+'' - in case 'a' is a String object
138+ if ( b . constructor === String ) return b + '' === a + '' ; // b+'' - in case 'b' is a String object
137139 return false ;
138140 }
139141
You can’t perform that action at this time.
0 commit comments