Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 260cfe6

Browse files
kuroky360gkalpak
authored andcommitted
refactor(toJson): use the isUndefined() function
Closes #13923
1 parent 455af41 commit 260cfe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Angular.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ function toJsonReplacer(key, value) {
11881188
* @returns {string|undefined} JSON-ified string representing `obj`.
11891189
*/
11901190
function toJson(obj, pretty) {
1191-
if (typeof obj === 'undefined') return undefined;
1191+
if (isUndefined(obj)) return undefined;
11921192
if (!isNumber(pretty)) {
11931193
pretty = pretty ? 2 : null;
11941194
}

0 commit comments

Comments
 (0)