Skip to content

Commit

Permalink
Fixed crash when using className with spaces in icon (#413)
Browse files Browse the repository at this point in the history
* Fixed crash when using className with spaces in icon

* ver up

* ver up
  • Loading branch information
ota-meshi authored Nov 6, 2023
1 parent 5e31f85 commit 38db1ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cheetah-grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cheetah-grid",
"version": "1.12.0",
"version": "1.12.1",
"description": "Cheetah Grid is a high performance grid engine that works on canvas",
"keywords": [
"spreadsheet",
Expand Down
3 changes: 2 additions & 1 deletion packages/cheetah-grid/src/js/internal/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function getIconProps(
}
const dom =
doms[tagName] || (doms[tagName] = document.createElement(tagName));
dom.classList.add(className);
// `classList.add()` cannot be used because it may be separated by spaces.
dom.className = className;
dom.classList.add("cheetah-grid-icon");
document.body.appendChild(dom);
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-cheetah-grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-cheetah-grid",
"version": "1.12.0",
"version": "1.12.1",
"description": "Cheetah Grid for Vue.js",
"main": "lib/index.js",
"unpkg": "dist/vueCheetahGrid.js",
Expand Down

0 comments on commit 38db1ba

Please sign in to comment.