urbit-ob

JavaScript utilities for phonemic base wrangling.
Log | Files | Refs | README

commit 3a9a86aab94d2eb5eda2053826ab7ca7128954dc
parent 032c95e60d6b4e19291068348c8ee253f1cf05ce
Author: Fang <Fang-@users.noreply.github.com>
Date:   Fri, 14 Jun 2019 15:07:47 +0200

Make patp2syls always return array result

Would otherwise return null, crashing in cases like isValidPat('~')
Diffstat:
Msrc/internal/co.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/internal/co.js b/src/internal/co.js @@ -53,7 +53,7 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ ` const patp2syls = name => - name.replace(/[\^~-]/g,'').match(/.{1,3}/g) + (name.replace(/[\^~-]/g,'').match(/.{1,3}/g) || []) const splitAt = (index, str) => [str.slice(0, index), str.slice(index)]