Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Fischer authored and Raphael Fischer committed Feb 10, 2021
1 parent b8f616e commit 70914e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/original/element/scroll-left.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ import {UNSUPPORTED_ENVIRONMENT} from "../../support/unsupported-environment";

const s = Object.getOwnPropertyDescriptor(Element.prototype, "scrollTop");

export const ELEMENT_ORIGINAL_SCROLL_LEFT_SET_DESCRIPTOR = (UNSUPPORTED_ENVIRONMENT || typeof s !== "undefined")
? undefined
: s!.set!;
export const ELEMENT_ORIGINAL_SCROLL_LEFT_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT || typeof s === "undefined" ? undefined : s!.set!;
4 changes: 1 addition & 3 deletions src/original/element/scroll-top.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {UNSUPPORTED_ENVIRONMENT} from "../../support/unsupported-environment";

const s = Object.getOwnPropertyDescriptor(Element.prototype, "scrollTop");
export const ELEMENT_ORIGINAL_SCROLL_TOP_SET_DESCRIPTOR = (UNSUPPORTED_ENVIRONMENT || typeof s !== "undefined")
? undefined
: s!.set!;
export const ELEMENT_ORIGINAL_SCROLL_TOP_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT || typeof s === "undefined" ? undefined : s!.set!;

This comment has been minimized.

Copy link
@mushroom-cn

mushroom-cn Feb 10, 2022

undefined maybe cause NPE. please consider NPE while calling "ELEMENT_ORIGINAL_SCROLL_TOP_SET_DESCRIPTOR" method.

0 comments on commit 70914e5

Please sign in to comment.