@galacean/engine-core 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -36642,7 +36642,8 @@ __decorate([
36642
36642
  // Based on the specific version of the engine implementation, when actualBoundingBoxLeft is not supported, width is used to represent the rendering width, and `textAlign` uses the default value `start` and direction is left to right.
36643
36643
  // Some devices do not support actualBoundingBoxLeft and actualBoundingBoxRight in TextMetrics.
36644
36644
  // Examples: Google Pixel 2 XL (Android 11), Honor 6X (Android 8).
36645
- if (!("actualBoundingBoxLeft" in TextMetrics.prototype)) {
36645
+ // In WeChat Mini Games, TextMetrics may be reported as not defined, so a check for window.TextMetrics is added.
36646
+ if (window.TextMetrics && !("actualBoundingBoxLeft" in TextMetrics.prototype)) {
36646
36647
  Object.defineProperties(TextMetrics.prototype, {
36647
36648
  actualBoundingBoxLeft: {
36648
36649
  get: function get() {