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

Update dropkick.js #265

Merged
merged 1 commit into from
Jan 31, 2015
Merged

Update dropkick.js #265

merged 1 commit into from
Jan 31, 2015

Conversation

vreshch
Copy link
Contributor

@vreshch vreshch commented Jan 12, 2015

Some mobiles gets confused on refresh call

Some mobiles  gets confused on refresh call
@Robdel12
Copy link
Owner

Can you write a test proving the bug and that this fixes it?

Edit: didn't mean to close it..

@Robdel12 Robdel12 closed this Jan 12, 2015
@Robdel12 Robdel12 reopened this Jan 12, 2015
@@ -25,7 +25,7 @@ var
var i;

// Prevent DK on mobile
if ( window.isMobile && !opts.mobile ) {
if ( window.isMobile && opts &&!opts.mobile ) {
Copy link
Owner

Choose a reason for hiding this comment

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

window.isMobile && opts && !opts.mobile

@spoonben
Copy link

I've actually also seen this, I'll try writing the test to prove it.

Actually, it would be better to add opts = opts || {} on line 26. I'll make a PR for that.

@wwilsman
Copy link
Collaborator

Could you explain why it would be better? As I see it, besides that if statement, opts is only ever really passed onto the init method, which handles it appropriately. It'd be redundant to have both this.opts and this.data.settings (which also holds other data as well).

@spoonben
Copy link

@wwilsman, thought this was a better way to test #266, also I don't think it is redundant since settings is extending opts https://github.com/Robdel12/DropKick/blob/master/dropkick.js#L259

@Robdel12 Robdel12 merged commit 3fea14b into Robdel12:master Jan 31, 2015
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.

None yet

4 participants