mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
This commit updates the Babel plugin to: - apply the same flattening logic that we already have for blocks, to flatten blocks nested inside class static blocks - remove class static blocks when, after flattening all the blocks they contain, they are empty. Before this commit, the transform output was the same as the input.
20 lines
220 B
JavaScript
20 lines
220 B
JavaScript
class A {
|
|
static {}
|
|
static {
|
|
{ foo() }
|
|
}
|
|
static {
|
|
{;}
|
|
}
|
|
static {
|
|
if (PDFJSDev.test('TRUE')) {
|
|
var a = 0;
|
|
}
|
|
}
|
|
|
|
static {
|
|
if (PDFJSDev.test('FALSE')) {
|
|
var a = 1;
|
|
}
|
|
}
|
|
}
|