[+] Add default value to currentWidth
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ export default class Responsive
|
|||||||
*
|
*
|
||||||
* @param currentWidth
|
* @param currentWidth
|
||||||
*/
|
*/
|
||||||
getNumberOnScreen(currentWidth: number)
|
getNumberOnScreen(currentWidth: number = document.documentElement.clientWidth)
|
||||||
{
|
{
|
||||||
// Screen too small
|
// Screen too small
|
||||||
if (currentWidth < vhToPx(this.margin) * 2 + this.minWidth) return 1;
|
if (currentWidth < vhToPx(this.margin) * 2 + this.minWidth) return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user