diff --git a/assets/typescript/Colour.ts b/assets/typescript/Colour.ts index 02918d37..20de2675 100644 --- a/assets/typescript/Colour.ts +++ b/assets/typescript/Colour.ts @@ -101,7 +101,7 @@ function colourFromRGB(red: number, green: number, blue: number): number { } function colourFromHex(hex: string): number { - if(hex.startsWith('#')) + if(hex.indexOf('#') === 0) hex = hex.substr(1); const length: number = hex.length; diff --git a/assets/typescript/Comments.tsx b/assets/typescript/Comments.tsx index 5949624a..d147d6c8 100644 --- a/assets/typescript/Comments.tsx +++ b/assets/typescript/Comments.tsx @@ -232,7 +232,7 @@ function commentConstruct(comment: CommentPostInfo, layer: number = 0): HTMLElem