{"action":"created","issue":{"url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/170","repository_url":"https://api.github.com/repos/ganlanyuan/tiny-slider","labels_url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/170/comments","events_url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/170/events","html_url":"https://github.com/ganlanyuan/tiny-slider/issues/170","id":304764791,"number":170,"title":"No slider with only 1 item allowed","user":{"login":"JeroenReumkens","id":2969573,"avatar_url":"https://avatars2.githubusercontent.com/u/2969573?v=4","gravatar_id":"","url":"https://api.github.com/users/JeroenReumkens","html_url":"https://github.com/JeroenReumkens","followers_url":"https://api.github.com/users/JeroenReumkens/followers","following_url":"https://api.github.com/users/JeroenReumkens/following{/other_user}","gists_url":"https://api.github.com/users/JeroenReumkens/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroenReumkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroenReumkens/subscriptions","organizations_url":"https://api.github.com/users/JeroenReumkens/orgs","repos_url":"https://api.github.com/users/JeroenReumkens/repos","events_url":"https://api.github.com/users/JeroenReumkens/events{/privacy}","received_events_url":"https://api.github.com/users/JeroenReumkens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-13T13:29:39Z","updated_at":"2018-03-15T17:29:14Z","closed_at":null,"author_association":"NONE","body":"__Issue description__:  \r\nWhen there is only one slide, the slider won't initiate. What is the reasoning behind this? In a CMS it could sometimes be the case that they will only add one slide. Right now it will break because no width is applied (if have 4 items visible per page, so now 1 slide is as wide as 4) and the arrows are still visible. \r\n\r\nBecause of this code: \r\n``` \r\n if (options.container.children.length < 2) {\r\n    if (supportConsoleWarn) { console.warn('Slides less than 2.'); }\r\n    return;\r\n   } \r\n```\r\n\r\nMy suggestion is to make it an option to initialise the slider with only one slide, since I can not really think of a reason not to? \r\n\r\n_Tiny-slider version_:    2.6.0\r\n_Browser name && version_:  Chrome 64\r\n_OS name && version_:   OSX 10.13.3"},"comment":{"url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/comments/373459134","html_url":"https://github.com/ganlanyuan/tiny-slider/issues/170#issuecomment-373459134","issue_url":"https://api.github.com/repos/ganlanyuan/tiny-slider/issues/170","id":373459134,"user":{"login":"ganlanyuan","id":4998811,"avatar_url":"https://avatars3.githubusercontent.com/u/4998811?v=4","gravatar_id":"","url":"https://api.github.com/users/ganlanyuan","html_url":"https://github.com/ganlanyuan","followers_url":"https://api.github.com/users/ganlanyuan/followers","following_url":"https://api.github.com/users/ganlanyuan/following{/other_user}","gists_url":"https://api.github.com/users/ganlanyuan/gists{/gist_id}","starred_url":"https://api.github.com/users/ganlanyuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganlanyuan/subscriptions","organizations_url":"https://api.github.com/users/ganlanyuan/orgs","repos_url":"https://api.github.com/users/ganlanyuan/repos","events_url":"https://api.github.com/users/ganlanyuan/events{/privacy}","received_events_url":"https://api.github.com/users/ganlanyuan/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T17:29:14Z","updated_at":"2018-03-15T17:29:14Z","author_association":"OWNER","body":"Now I understand what you mean, thanks.\r\nUpdated in [this commit](https://github.com/ganlanyuan/tiny-slider/commit/989aeb4ba5578f69a00dede69f041b2f8de943d7)."}}
{"actor":{"display_login":"ganlanyuan"}}