Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ssr again #52

Merged
merged 9 commits into from
Apr 4, 2023
Merged

fix ssr again #52

merged 9 commits into from
Apr 4, 2023

Conversation

shiyiya
Copy link
Contributor

@shiyiya shiyiya commented Apr 4, 2023

No description provided.

@@ -1,4 +1,4 @@
const dpr = window.devicePixelRatio || 1;
const dpr = typeof window !== undefined && window.devicePixelRatio || 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

字符串的 'undefined'

src/utils.js Outdated
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
(typeof window !== undefined &&
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

格式,下同

var raf =
  (
    typeof window !== 'undefined' &&
    (
      window.requestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.webkitRequestAnimationFrame
    )
  ) ||
  function(cb) {
    return setTimeout(cb, 50 / 3);
  };

src/utils.js Outdated
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
export var /* istanbul ignore next */ raf =
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行别改

src/utils.js Outdated
window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
export var /* istanbul ignore next */ caf =
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不太明白你的意思 你可以改直接修改pr内容的

@weizhenye weizhenye merged commit 9fb49c5 into weizhenye:master Apr 4, 2023
@shiyiya
Copy link
Contributor Author

shiyiya commented Apr 4, 2023

@weizhenye 看起来还有地方执行了

image

@weizhenye
Copy link
Owner

我还没发版本,你确定引用的是修改后的吗?从源码逻辑看应该没有自执行了。

@shiyiya
Copy link
Contributor Author

shiyiya commented Apr 4, 2023

image

@weizhenye
Copy link
Owner

dist 只在发版本才会构建,目前仓库里的 dist 是旧的

@shiyiya
Copy link
Contributor Author

shiyiya commented Apr 4, 2023

dist 只在发版本才会构建,目前仓库里的 dist 是旧的

对哦

@shiyiya
Copy link
Contributor Author

shiyiya commented Apr 4, 2023

构建个新的试试?@ @weizhenye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants