Skip to content

Commit

Permalink
Merge pull request #755 from d-i-t-a/bugfix/viewport-parsing
Browse files Browse the repository at this point in the history
checks viewport parsing if it already contains "px" in height and width
  • Loading branch information
aferditamuriqi authored Jan 31, 2024
2 parents c96c121 + fb33796 commit d9ad625
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/navigator/IFrameNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2576,8 +2576,12 @@ export class IFrameNavigator extends EventEmitter implements Navigator {
return obj;
}, {});
if (parseInt(obj["height"]) !== 0 || parseInt(obj["width"]) !== 0) {
height = obj["height"] + "px";
width = obj["width"] + "px";
height = obj["height"].endsWith("px")
? obj["height"]
: obj["height"] + "px";
width = obj["width"].endsWith("px")
? obj["width"]
: obj["width"] + "px";
}
}
}
Expand Down

0 comments on commit d9ad625

Please sign in to comment.