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

Commit b5c317d

Browse files
kuroky360gkalpak
authored andcommitted
refactor(toJson): use the isUndefined() function
Closes #13923
1 parent 05741eb commit b5c317d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ function toJsonReplacer(key, value) {
11781178
* @returns {string|undefined} JSON-ified string representing `obj`.
11791179
*/
11801180
function toJson(obj, pretty) {
1181-
if (typeof obj === 'undefined') return undefined;
1181+
if (isUndefined(obj)) return undefined;
11821182
if (!isNumber(pretty)) {
11831183
pretty = pretty ? 2 : null;
11841184
}

0 commit comments

Comments
 (0)