scroll-behavior-polyfill
Advanced tools
Comparing version 2.0.9 to 2.0.10
@@ -0,1 +1,7 @@ | ||
## [2.0.10](https://github.com/wessberg/scroll-behavior-polyfill/compare/v2.0.9...v2.0.10) (2019-07-18) | ||
### Bug Fixes | ||
- **bug:** makes it possible to use the polyfill without native WeakMap support ([012b486](https://github.com/wessberg/scroll-behavior-polyfill/commit/012b486)) | ||
## [2.0.9](https://github.com/wessberg/scroll-behavior-polyfill/compare/v2.0.8...v2.0.9) (2019-07-18) | ||
@@ -2,0 +8,0 @@ |
@@ -174,6 +174,6 @@ (function () { | ||
}; | ||
var map = new WeakMap(); | ||
var map = typeof WeakMap === "undefined" ? undefined : new WeakMap(); | ||
function disableScrollSnap(scroller) { | ||
// If scroll-behavior is natively supported, there's no need for this fix | ||
if (SUPPORTS_SCROLL_BEHAVIOR) { | ||
// If scroll-behavior is natively supported, or if there is no native WeakMap support, there's no need for this fix | ||
if (SUPPORTS_SCROLL_BEHAVIOR || map == null) { | ||
return NOOP; | ||
@@ -225,3 +225,5 @@ } | ||
eventTarget.removeEventListener("scroll", resetHandler); | ||
map["delete"](scroller); | ||
if (map != null) { | ||
map["delete"](scroller); | ||
} | ||
hasReleased = true; | ||
@@ -228,0 +230,0 @@ } |
{ | ||
"name": "scroll-behavior-polyfill", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "A polyfill for the 'scroll-behavior' CSS-property", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -185,3 +185,2 @@ <!-- SHADOW_SECTION_LOGO_START --> | ||
- `Object.defineProperty` | ||
- `WeakMap` | ||
@@ -188,0 +187,0 @@ For by far the most browsers, these features will already be natively available. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149873
994
236