Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setImageProvider() {
if (this.needsSetImageProvider && this.renderer) {
if (this.renderer.binaryImageStream) {
ImageProviders.setImageProvider(this.renderer.binaryImageStream);
} else {
if (!this.localRenderingImageProvider) {
this.localRenderingImageProvider = new LocalRenderingImageProvider();
}
ImageProviders.setImageProvider(this.localRenderingImageProvider);
}
this.needsSetImageProvider = false;
}
}