Skip to content

Commit c03b20b

Browse files
authored
Fix problem preventing debugger user survey banner from appearing. (microsoft#2558)
Make the new `Random` class implement `IRandom` and mark it as `injectable`.
1 parent 2f7715a commit c03b20b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎news/2 Fixes/2557.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix issue preventing debugger user survey banner from opening.

‎src/utils/random.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
'use strict';
55

66
import * as crypto from 'crypto';
7+
import { injectable } from 'inversify';
8+
import { IRandom } from '../client/common/types';
79

810
function getRandom(): number {
911
let num: number = 0;
@@ -20,8 +22,8 @@ export function getRandomBetween(min: number = 0, max: number = 10): number {
2022
return min + (randomVal * (max - min));
2123
}
2224

23-
export class Random {
24-
25+
@injectable()
26+
export class Random implements IRandom {
2527
public getRandomInt(min: number = 0, max: number = 10): number {
2628
return getRandomBetween(min, max);
2729
}

0 commit comments

Comments
 (0)