From 2b64fbfba6da7d763cbc2bcd870a12f512538bdb Mon Sep 17 00:00:00 2001 From: Caleb Date: Tue, 3 Oct 2017 16:08:23 -0600 Subject: [PATCH] Allow empty options object for `sanitizeSlug`. --- src/lib/urlHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/urlHelper.js b/src/lib/urlHelper.js index c146618b..a6bb71cf 100644 --- a/src/lib/urlHelper.js +++ b/src/lib/urlHelper.js @@ -43,7 +43,7 @@ export function sanitizeIRI(str, { replacement = "" } = {}) { return result; } -export function sanitizeSlug(str, { replacement = '-' }) { +export function sanitizeSlug(str, { replacement = '-' } = {}) { if (!isString(str)) throw "`sanitizeSlug` only accepts strings as input."; if (!isString(replacement)) throw "the `sanitizeSlug` replacement character must be a string.";