From 61acdd0c295e4447c9c10da04e287b1ebffe452c Mon Sep 17 00:00:00 2001 From: JD Isaacks Date: Tue, 20 Jun 2017 17:55:44 -0400 Subject: [PATCH] default prefix to empty string (#3214) This starting returning NaN for me. It looks like it is trying to add undefined + number when there is no prefix. --- uniqueId.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uniqueId.js b/uniqueId.js index 19a7eb1e6..16909062d 100644 --- a/uniqueId.js +++ b/uniqueId.js @@ -17,7 +17,7 @@ let idCounter = 0 * uniqueId() * // => '105' */ -function uniqueId(prefix) { +function uniqueId(prefix='') { const id = ++idCounter return `${prefix + id}` }