flex-wrap-layout
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,5 @@ | ||
## v0.1.1 (2019/03/25) | ||
- Fix crash when testing with Jest | ||
## v0.1.0 (2019/03/25) | ||
@@ -2,0 +6,0 @@ |
@@ -10,3 +10,4 @@ "use strict"; | ||
function run() { | ||
detectRowWrap_1.detectRowWrap(rootEl); | ||
if (rootEl) | ||
detectRowWrap_1.detectRowWrap(rootEl); | ||
} | ||
@@ -23,12 +24,14 @@ // See [Difference between DOMContentLoaded and load events](https://stackoverflow.com/q/2414750) | ||
// Remove all CSS classes | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
if (rootEl) { | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
}; | ||
@@ -35,0 +38,0 @@ }, [rootRef]); |
@@ -8,3 +8,4 @@ import { useEffect } from 'react'; | ||
function run() { | ||
detectRowWrap(rootEl); | ||
if (rootEl) | ||
detectRowWrap(rootEl); | ||
} | ||
@@ -21,12 +22,14 @@ // See [Difference between DOMContentLoaded and load events](https://stackoverflow.com/q/2414750) | ||
// Remove all CSS classes | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
if (rootEl) { | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
}; | ||
@@ -33,0 +36,0 @@ }, [rootRef]); |
{ | ||
"name": "flex-wrap-layout", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -24,4 +24,4 @@ "type": "git", | ||
"scripts": { | ||
"clean": "rm -rf dist build", | ||
"clean:all": "yarn clean && rm -rf node_modules yarn.lock yarn-error.log", | ||
"clean": "rm -rf dist build yarn-error.log", | ||
"clean:all": "yarn clean && rm -rf node_modules yarn.lock", | ||
"build:umd": "NODE_ENV=development rollup --config && NODE_ENV=production rollup --config", | ||
@@ -28,0 +28,0 @@ "build:esnext": "tsc --noEmit false --outDir dist --module esnext --declaration true", |
@@ -11,3 +11,3 @@ import React, { useEffect } from 'react'; | ||
function run() { | ||
detectRowWrap(rootEl); | ||
if (rootEl) detectRowWrap(rootEl); | ||
} | ||
@@ -29,13 +29,14 @@ | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
if (rootEl) { | ||
// Use getElementsByClassName() instead of querySelectorAll() | ||
// because it is much faster, see https://stackoverflow.com/a/43967953/990356 | ||
let children = rootEl.getElementsByClassName('wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('wrapped'); | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
} | ||
children = rootEl.getElementsByClassName('next-is-wrapped'); | ||
for (const el of children) { | ||
el.classList.remove('next-is-wrapped'); | ||
} | ||
}; | ||
@@ -42,0 +43,0 @@ }, [rootRef]); |
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
57831
972