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

一个小问题 #3

Closed
yyb1995 opened this issue Jun 12, 2019 · 5 comments
Closed

一个小问题 #3

yyb1995 opened this issue Jun 12, 2019 · 5 comments
Labels
invalid This doesn't seem right

Comments

@yyb1995
Copy link

yyb1995 commented Jun 12, 2019

你好,我想问下这里是不是当live2d_settings.homePageUrl == 'auto'时并没有进行赋值操作,只是做了判断?我觉得应该是live2d_settings.homePageUrl = live2d_settings.homePageUrl == 'auto' ? window.location.protocol+'//'+window.location.hostname+'/' : live2d_settings.homePageUrl;

live2d_settings.homePageUrl == 'auto' ? window.location.protocol+'//'+window.location.hostname+'/' : live2d_settings.homePageUrl;

@fghrsh
Copy link
Owner

fghrsh commented Jun 12, 2019

唔.. 在 initModel() 前,应该已经 live2d_settings['homePageUrl'] = 'auto'; 了...

@yyb1995
Copy link
Author

yyb1995 commented Jun 12, 2019

嗯就是这一步好像是当live2d_settings.homePageUrl == 'auto'时把它换成具体的地址,不知道我理解的对不对

@fghrsh
Copy link
Owner

fghrsh commented Jun 12, 2019

嗯,当 == 'auto' 时,自动获取当前首页地址,否则为用户自定义的值

@yyb1995
Copy link
Author

yyb1995 commented Jun 12, 2019

我用Chrome单步调试了一下,发现经过这句后live2d_settings.homePageUrl还是等于'auto'

@fghrsh
Copy link
Owner

fghrsh commented Jun 12, 2019

仔细看了下的确忘了赋值 ... 感谢提醒

@fghrsh fghrsh added bug Something isn't working invalid This doesn't seem right and removed bug Something isn't working labels Jun 12, 2019
@fghrsh fghrsh closed this as completed in 2ba297a Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants