Skip to content

Commit 12d1df4

Browse files
authored
fix: error on isError due to changes of output format of npm view (#21)
1 parent 3c10b4b commit 12d1df4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/can-npm-publish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const viewPackage = (packageName, registry, options) => {
108108
};
109109
};
110110
const isError = (json) => {
111-
return json && "error" in json;
111+
return json && typeof json !== "string" && "error" in json;
112112
};
113113
const is404Error = (json) => {
114114
return isError(json) && json.error.code === "E404";

0 commit comments

Comments
 (0)