-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix ssr again #52
Conversation
src/engine/canvas.js
Outdated
@@ -1,4 +1,4 @@ | |||
const dpr = window.devicePixelRatio || 1; | |||
const dpr = typeof window !== undefined && window.devicePixelRatio || 1; |
There was a problem hiding this comment.
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 && |
There was a problem hiding this comment.
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 = |
There was a problem hiding this comment.
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 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不太明白你的意思 你可以改直接修改pr内容的
@weizhenye 看起来还有地方执行了 |
我还没发版本,你确定引用的是修改后的吗?从源码逻辑看应该没有自执行了。 |
dist 只在发版本才会构建,目前仓库里的 dist 是旧的 |
对哦 |
构建个新的试试?@ @weizhenye |
No description provided.