We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d51f773 + 6c3875b commit a393a96Copy full SHA for a393a96
src/hooks/books.js
@@ -35,7 +35,8 @@ export const usePreparedBooks = (books, images) => {
35
36
if (preparedBook.buy && preparedBook.buy !== '') {
37
preparedBook.buyList = preparedBook.buy.split(',').map((ord) => {
38
- const [label, link] = ord.split('-');
+ // split on first occurence of "-" as some links contain dashes
39
+ const [label, link] = ord.split(/-(.+)/);
40
return { label, link };
41
});
42
}
0 commit comments