Skip to content

Commit ba1043b

Browse files
author
Jayesh Patel
committed
fix for firefox browser.
1 parent ceb5acd commit ba1043b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/test/test.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
22
import { Router } from "@angular/router";
33
import { FileUtil } from './file.util';
44
import { Constants } from './test.constants';
5-
5+
66
@Component({
77
template: require('./test.component.html')
88
})
@@ -24,7 +24,8 @@ export class TestComponent implements OnInit {
2424
fileChangeListener($event): void {
2525

2626
var text = [];
27-
var files = $event.srcElement.files;
27+
var target = $event.target || $event.srcElement;
28+
var files = target.files;
2829

2930
if(Constants.validateHeaderAndRecordLengthFlag){
3031
if(!this._fileUtil.isCSVFile(files[0])){

0 commit comments

Comments
 (0)