RangeError: Maximum call stack size exceeded when using FieldNumber or FieldTextInput due to recursive size_ setter #9055
Labels
issue: bug
Describes why the code or behaviour is wrong
8000
Check for duplicates
Description
Starting in Blockly
12.0.0-beta.6
, using built-in fields likeFieldNumber
orFieldTextInput
can result in aRangeError: Maximum call stack size exceeded
.This is caused by the the introduction of an accessor in the FieldInput class (#9011). While the code looks correct, when compiled with common tools (e.g. Webpack/Babel), the call to
super.size_ = ...
is sometimes transpiled tothis.size_ = ...
, causing infinite recursion at runtime. This affects any project that usesFieldNumber
,FieldTextInput
, or otherFieldInput
subclasses.This is a bundler-sensitive issue triggered by the recent introduction of an accessor for
size_
.Reproduction steps
FieldNumber
orFieldTextInput
Stack trace
Screenshots
Browsers
No response
The text was updated successfully, but these errors were encountered: