Blockrazor / blockrazor

Absolutely ALL information about EVERY blockchain project in a comparison tool that ANYONE can understand. Administered by @gazhayes
Mozilla Public License 2.0
48 stars 55 forks source link

Some lack in code #2070

Closed rkbsoftsolutions closed 6 years ago

rkbsoftsolutions commented 6 years ago

Problems:

1) Meteor.users.findOne({: Meteor.userId()}).slug, 2) $('#imageInput').val()

Solutions:

1) It should be like this Meteor.user().slug

2) it should be templateinstance.$('#imageInput').val() . Because if we find any template DOM values blaze provide us Jquery instance with current template instance. So it will find element only in template not in whole page DOM

rkbsoftsolutions commented 6 years ago

@anbud , Please have look above-said issues and let me know your suggestions for same.

anbud commented 6 years ago

Hmm, for the first one, I believe that Meteor.users.findOne() is used in most of the places as Meteor.user() sometimes doesn't return all fields from the user object. I could be wrong on this one though, I'm not sure.

For the second one, you're totally correct, we should use the scoped jQuery instance to avoid the possibility of detecting a wrong element in the whole DOM. It's not a huge issue though, it's not causing problems currently, but it may in the future.

rkbsoftsolutions commented 6 years ago

@anbud, For the first one I agree with you but it depends upon where we need full user detail or default detail, so we can user Meteor.user() where we need default detail.

what I need to do Should I put on hold or need to work on it?

gsovereignty commented 6 years ago

@staronline1985 I'll be adding a lot of new issues to blockrazor over the coming days and you'll get a better sense of what kind of things are valid problems.