Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 972eb2b

Browse files
committed
fix
1 parent 0230a49 commit 972eb2b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎packages/plugin-react/src/html/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default function(api: PluginAPI) {
2626

2727
const addToData = (name: HtmlDataKey) => (data: string) => {
2828
const field = htmlData[name];
29-
if (Array.isArray(field)&&!field.includes(data)) {
30-
field.push(data);
29+
if (Array.isArray(field)) {
30+
if(!field.includes(data))field.push(data);
3131
} else {
3232
// @ts-ignore
3333
htmlData[name] = data;

‎packages/plugin-webpack5-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/console-toolkit-plugin-webpack5-react",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "console toolkit plugin for base react app",
55
"main": "lib/index.js",
66
"scripts": {

‎packages/plugin-webpack5-react/src/html/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface HtmlData {
1313
}
1414

1515
export default function(api: PluginAPI) {
16-
1716
const htmlData: HtmlData = {
1817
head: "",
1918
metas: [],
@@ -26,8 +25,8 @@ export default function(api: PluginAPI) {
2625

2726
const addToData = (name: HtmlDataKey) => (data: string) => {
2827
const field = htmlData[name];
29-
if (Array.isArray(field)&&!field.includes(data)) {
30-
field.push(data);
28+
if (Array.isArray(field)) {
29+
if(!field.includes(data))field.push(data);
3130
} else {
3231
// @ts-ignore
3332
htmlData[name] = data;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /