Skip to content

Commit

Permalink
Fix duck test (#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbhopper authored Aug 9, 2023
1 parent f06788b commit 6e91308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/impl/zoneUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function normalizeZone(input, defaultZone) {
else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
} else if (isNumber(input)) {
return FixedOffsetZone.instance(input);
} else if (typeof input === "object" && input.offset && typeof input.offset === "number") {
} else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
// This is dumb, but the instanceof check above doesn't seem to really work
// so we're duck checking it
return input;
Expand Down

0 comments on commit 6e91308

Please sign in to comment.