reuse code path for handling JavaScript assets

This commit is contained in:
Daniel Micay 2019-06-29 20:03:46 -04:00
parent 1a5b59944e
commit 4c36a7bb57

View File

@ -190,15 +190,7 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
return fromAsset("text/css", path);
}
if ("/viewer.js".equals(path)) {
return fromAsset("application/javascript", path);
}
if ("/pdf.js".equals(path)) {
return fromAsset("application/javascript", path);
}
if ("/pdf.worker.js".equals(path)) {
if ("/viewer.js".equals(path) || "/pdf.js".equals(path) || "/pdf.worker.js".equals(path)) {
return fromAsset("application/javascript", path);
}