Skip to content

Conversation

@leeyeh
Copy link
Contributor

@leeyeh leeyeh commented May 31, 2017

@leeyeh leeyeh requested a review from tang3w May 31, 2017 06:58
@codecov-io
Copy link

codecov-io commented May 31, 2017

Codecov Report

Merging #484 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #484      +/-   ##
==========================================
+ Coverage   65.43%   65.44%   +0.01%     
==========================================
  Files          34       34              
  Lines        2847     2848       +1     
==========================================
+ Hits         1863     1864       +1     
  Misses        984      984
Impacted Files Coverage Δ
src/query.js 65.79% <100%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66cabe8...76feab0. Read the comment docs.

return new AV.Object(response.className);
}
return obj;
if (this.objectClass === AV.Role) {
Copy link

Choose a reason for hiding this comment

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

只有通过 new AV.Role() 创建才会打印废弃日志吗?通过 new AV.Object('_Role') 创建会不会触发?如果也会触发,把这个判断提到上个 if 语句的前面会不会好些?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

其实 query 返回的 response.className 是没有的,所以理论上上面这个逻辑应该是走不到的。

Copy link

Choose a reason for hiding this comment

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

好的,如果确保任何时候 Role 查询的 response 中 className 都没有,就没有问题。

@leeyeh leeyeh merged commit 54baa5c into leancloud:master May 31, 2017
@leeyeh leeyeh deleted the fix-query-role-warn branch May 31, 2017 08:43
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.

3 participants