Skip to content

Commit b4134f6

Browse files
Yair Even OrYair Even Or
Yair Even Or
authored and
Yair Even Or
committed
should use ; as a delimiter for the swatches saves in localstorage
1 parent 50acba2 commit b4134f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/swatches.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ export function getSetGlobalSwatches(data){
1111
customKey = typeof _store == 'string' ? _store : '';
1212

1313
if ( _store && data ){
14-
localStorage.setItem(storeKey + customKey, data)
14+
localStorage.setItem(storeKey + customKey, data.join(';'))
1515
dispatchEvent( new Event('storage') )
1616
}
1717

1818
// "filter(String)" clean up any empty strings
19-
return localStorage[storeKey + customKey]?.split(',').filter(String) || []
19+
return localStorage[storeKey + customKey]?.split(';').filter(String) || []
2020
}
2121

2222
// sync instance swatches with global ones. skip duplicates

0 commit comments

Comments
 (0)