X Tutup
Skip to content

Commit 171b101

Browse files
JackLianliujuping
authored andcommitted
test: add ut for render-core/utils/data-helper.ts
1 parent bf280c6 commit 171b101

File tree

4 files changed

+728
-169
lines changed

4 files changed

+728
-169
lines changed

packages/renderer-core/src/renderer/base.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-len */
12
/* eslint-disable react/prop-types */
23
import classnames from 'classnames';
34
import { create as createDataSourceEngine } from '@alilc/lowcode-datasource-engine/interpret';
@@ -154,8 +155,7 @@ export default function baseRendererFactory(): IBaseRenderComponent {
154155
this.__showPlaceholder = false;
155156
return resolve({});
156157
}
157-
this.__dataHelper
158-
.getInitData()
158+
this.__dataHelper.getInitData()
159159
.then((res: any) => {
160160
this.__showPlaceholder = false;
161161
if (isEmpty(res)) {
@@ -286,8 +286,7 @@ export default function baseRendererFactory(): IBaseRenderComponent {
286286
// this.__showPlaceholder = false;
287287
return resolve({});
288288
}
289-
this.__dataHelper
290-
.getInitData()
289+
this.__dataHelper.getInitData()
291290
.then((res: any) => {
292291
// this.__showPlaceholder = false;
293292
if (isEmpty(res)) {

packages/renderer-core/src/utils/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function isJSSlot(obj: any): obj is JSSlot {
118118
}
119119

120120
// Compatible with the old protocol JSBlock
121-
return ([EXPRESSION_TYPE.JSSLOT, EXPRESSION_TYPE.JSBLOCK].includes(obj.type));
121+
return [EXPRESSION_TYPE.JSSLOT, EXPRESSION_TYPE.JSBLOCK].includes(obj.type);
122122
}
123123

124124
/**

0 commit comments

Comments
 (0)
X Tutup