-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
This tracker is for issues related to:
- dev_compiler
I originally posted this as a dart-sass issue (sass/dart-sass#851), but was told to move it here as it relates to the compiler for this sdk.
Here is the code in question:
sdk/pkg/compiler/lib/src/js_emitter/native_generator.dart
Lines 48 to 50 in 5721d8a
| var tableProperty = "___dart_isolate_tags_"; | |
| var usedProperties = Object[tableProperty] || | |
| (Object[tableProperty] = Object.create(null)); |
The code sets something directly on the Object constructor. As a general rule of thumb, you should never set anything on native prototypes or constructors, and this particular line causes issues with another project (object-hash). You can view an example of the interaction mismatch at https://codesandbox.io/s/pensive-worker-tnwrs - you'll notice you get a different hash output for the same object if you comment out the require for sass (which is a byproduct of it using the compiler from this project).
Please find a different way other than setting variables on built ins to do whatever this chunk of code is trying to do.