Skip to content

Commit

Permalink
fix #98090. hash for float numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Jun 24, 2020
1 parent faec90a commit fcbc010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/colorPicker/colorDetector.ts
Expand Up @@ -173,7 +173,7 @@ export class ColorDetector extends Disposable implements IEditorContribution {
for (let i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) {
const { red, green, blue, alpha } = colorData[i].colorInfo.color;
const rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);
let subKey = hash(rgba).toString(16);
let subKey = hash(`rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`).toString(16);
let color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;
let key = 'colorBox-' + subKey;

Expand Down

0 comments on commit fcbc010

Please sign in to comment.