cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Build Error. #107

Open RobertThwaite opened 7 years ago

RobertThwaite commented 7 years ago

On Angular Final release I got a:

"node_modules/ng2-img-cropper/src/imageCropper.ts(135,28): error TS2345: Argument of type 'RegExp' is not assignable to parameter of type 'string'."

Error. I simply replaced this line:

let regEx = RegExp(/^(data:)([\w\/+]+);(charset=[\w-]+|base64).,(.)/gi);

With This Line:

let regEx = RegExp("/^(data:)([\w\/+]+);(charset=[\w-]+|base64).,(.)/gi");

And the error Is resolved. I would do a pull request but unfortunately I am not used to Github.