Skip to content

Commit 51e91c8

Browse files
authored
Update util.js
1 parent 7b7a4f4 commit 51e91c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;
33

44
export function encodeEntities(s) {
5+
if (typeof s !== 'string') s = String(s);
56
let out = '';
67
for (let i=0; i<s.length; i++) {
78
let ch = s[i];

0 commit comments

Comments
 (0)