Skip to content

Commit

Permalink
Merge pull request #66 from hcodes/fix_doc
Browse files Browse the repository at this point in the history
Fix for server rendering
  • Loading branch information
hcodes authored Dec 3, 2023
2 parents 8607190 + 84935ac commit 6cbb6d5
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 159 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v6.2.1
+ Fix for server rendering.

## v6.2.0
+ Improved randomization of snowflake positions.

Expand Down
2 changes: 1 addition & 1 deletion dist/snowflakes.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function addClass(node, className) {
function removeClass(node, className) {
node.classList.remove(className);
}
const isAnimationEndSupported = 'onanimationend' in document;
const isAnimationEndSupported = typeof document !== 'undefined' && 'onanimationend' in document;

/**
* Get random number.
Expand Down
2 changes: 1 addition & 1 deletion dist/snowflakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
function removeClass(node, className) {
node.classList.remove(className);
}
var isAnimationEndSupported = 'onanimationend' in document;
var isAnimationEndSupported = typeof document !== 'undefined' && 'onanimationend' in document;

/**
* Get random number.
Expand Down
2 changes: 1 addition & 1 deletion dist/snowflakes.light.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
function removeClass(node, className) {
node.classList.remove(className);
}
var isAnimationEndSupported = 'onanimationend' in document;
var isAnimationEndSupported = typeof document !== 'undefined' && 'onanimationend' in document;

/**
* Get random number.
Expand Down
2 changes: 1 addition & 1 deletion dist/snowflakes.light.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/snowflakes.min.js

Large diffs are not rendered by default.

294 changes: 147 additions & 147 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "magic-snowflakes",
"description": "Falling snowflakes",
"version": "6.2.0",
"version": "6.2.1",
"author": {
"name": "Denis Seleznev",
"email": "[email protected]",
Expand Down Expand Up @@ -36,21 +36,21 @@
],
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.5",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.10.0",
"autoprefixer": "^10.4.16",
"cssnano": "^6.0.1",
"del-cli": "5.1.0",
"eslint": "8.53.0",
"eslint": "8.55.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.31",
"postcss": "^8.4.32",
"postcss-cli": "^10.1.0",
"postcss-inline-svg": "^6.0.0",
"postcss-nested": "^6.0.1",
"rollup": "^4.3.0",
"rollup": "^4.6.1",
"terser": "^5.24.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"scripts": {
"test": "eslint . & npm run typecheck",
Expand Down
2 changes: 1 addition & 1 deletion src/ts/helpers/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ export function removeClass(node: HTMLElement, className: string) {
node.classList.remove(className);
}

export const isAnimationEndSupported = 'onanimationend' in document;
export const isAnimationEndSupported = typeof document !== 'undefined' && 'onanimationend' in document;

0 comments on commit 6cbb6d5

Please sign in to comment.