Change getUid return type from number to string
This commit is contained in:
@@ -81,7 +81,7 @@ class Fill {
|
||||
if (Array.isArray(color) || typeof color == 'string') {
|
||||
this.checksum_ = 'f' + asString(/** @type {import("../Color.js").Color|string} */ (color));
|
||||
} else {
|
||||
this.checksum_ = getUid(this.color_).toString();
|
||||
this.checksum_ = getUid(this.color_);
|
||||
}
|
||||
} else {
|
||||
this.checksum_ = 'f-';
|
||||
|
||||
@@ -149,7 +149,7 @@ class Icon extends ImageStyle {
|
||||
5); // `imgSize` must be set when `image` is provided
|
||||
|
||||
if ((src === undefined || src.length === 0) && image) {
|
||||
src = /** @type {HTMLImageElement} */ (image).src || getUid(image).toString();
|
||||
src = /** @type {HTMLImageElement} */ (image).src || getUid(image);
|
||||
}
|
||||
assert(src !== undefined && src.length > 0,
|
||||
6); // A defined and non-empty `src` or `image` must be provided
|
||||
|
||||
@@ -259,7 +259,7 @@ class Stroke {
|
||||
if (typeof this.color_ === 'string') {
|
||||
this.checksum_ += this.color_;
|
||||
} else {
|
||||
this.checksum_ += getUid(this.color_).toString();
|
||||
this.checksum_ += getUid(this.color_);
|
||||
}
|
||||
} else {
|
||||
this.checksum_ += '-';
|
||||
|
||||
Reference in New Issue
Block a user