Skip to content

Commit

Permalink
Bug 1235990 - Correct array type checking. r=shu
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Gomez committed Jan 7, 2016
1 parent ffae8ec commit 9a7f224
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion b2g/components/PersistentDataBlock.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function toHexString(data) {
let hexString = "";
if (typeof data === "string") {
hexString = Array.from(data, (c, i) => toHexChar(data.charCodeAt(i))).join("");
} else if (typeof data === "array") {
} else if (data instanceof Array) {
hexString = data.map(toHexChar).join("");
}
return hexString;
Expand Down
2 changes: 1 addition & 1 deletion b2g/components/test/unit/file_persistentdatablock.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function toHexString(data) {
let hexString = "";
if (typeof data === "string") {
hexString = Array.from(data, (c, i) => toHexChar(data.charCodeAt(i))).join("");
} else if (typeof data === "array") {
} else if (data instanceof Array) {
hexString = data.map(toHexChar).join("");
}
return hexString;
Expand Down

0 comments on commit 9a7f224

Please sign in to comment.