Skip to content

Commit 21a8293

Browse files
committed
remove startsWith for ie
1 parent 3b1288a commit 21a8293

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/color/color.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ColorService {
4141
this.renderer2.setStyle(this.elementRef.nativeElement, property, colors[color]);
4242
} else {
4343
this.renderer2.removeClass(this.elementRef.nativeElement, 'bg-color');
44-
if(color.startsWith('#') || color.startsWith('rgb')) {
44+
if(color.indexOf('#') === 0 || color.indexOf('rgb') === 0) {
4545
this.currentBackgroundStyle = {property: property, color: color};
4646
this.renderer2.setStyle(this.elementRef.nativeElement, property, color);
4747
} else if(colorsAliases.indexOf(color) !== -1) {

0 commit comments

Comments
 (0)