konzen commented on code in PR #21739:
URL: https://github.com/apache/echarts/pull/21739#discussion_r3807440494
##########
src/model/Global.ts:
##########
@@ -314,6 +316,18 @@ class GlobalModel extends Model<ECUnitOption> {
opt: InnerSetOptionOpts
): void {
const option = this.option;
+ const timeZone = newOption.timeZone != null
+ ? newOption.timeZone
+ : option.timeZone;
+ if (timeZone != null) {
+ this._timeZone = validateTimeZone(timeZone);
+ }
+ else if (newOption.useUTC != null) {
+ this._timeZone = resolveTimeZone(newOption);
+ }
+ else if (this._timeZone == null) {
+ this._timeZone = resolveTimeZone(option);
+ }
Review Comment:
Thanks. I checked the option merge semantics and intentionally left this
unchanged. timeZone?: string does not accept null, and global null values are
generally ignored during merging. Special-casing this option would make the
resolved state inconsistent with option.timeZone. Replacing the complete option
with notMerge resets it to the default behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]