We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
C3D.create = function (obj) { var _obj; switch (typeof(obj)) { case 'array': _obj = {type: 'sprite', children: obj}; break; case 'object': _obj = obj; break; default: return; } return createObj(_obj); };
这段代码里面使用了typeof(obj)来判断是否为数组。事实上typeof([])返回的是'object'
The text was updated successfully, but these errors were encountered:
多谢提醒,已修复
Sorry, something went wrong.
No branches or pull requests
这段代码里面使用了typeof(obj)来判断是否为数组。事实上typeof([])返回的是'object'
The text was updated successfully, but these errors were encountered: