Skip to content

Commit 6edbadd

Browse files
committed
fix(crosslink); hide crosslink for jslibs
1 parent cfb7e5c commit 6edbadd

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/executable-code/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default class ExecutableCode {
116116
crosslinkValue === 'disabled' || // disabled by developer
117117
highlightOnly || // highlighted only not worked in...
118118
( // Unsupported external deps
119-
(jsLibs && jsLibs.length > 0) ||
119+
(jsLibs && !!jsLibs.size) ||
120120
(hiddenDependencies && hiddenDependencies.length > 0)
121121
)
122122
)

tests/crosslink.e2e.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,15 @@ test.describe('open in playground', () => {
5252
printlnCode('Hello, World'),
5353
));
5454

55-
test('no link for js-libs', ({ page }) => {
56-
test.fixme(
57-
true,
58-
"Test doesn't work, BUG in code! jsLibs.length -> jsLibs.size",
59-
);
60-
61-
return checkCrosslink(
55+
test('no link for js-libs', ({ page }) =>
56+
checkCrosslink(
6257
page,
6358
{
6459
'data-target-platform': 'js',
6560
'data-js-libs': 'https://somescript.js',
6661
},
6762
printlnCode('Hello, World!'),
68-
);
69-
});
63+
));
7064

7165
test('no link for hidden deps', ({ page }) =>
7266
checkCrosslink(

0 commit comments

Comments
 (0)