[+] Add default value to currentWidth

This commit is contained in:
Hykilpikonna
2019-12-23 11:24:21 -05:00
parent 526c2c5a37
commit 8a562ab27d
+1 -1
View File
@@ -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;