Update src/shared/compatibility.js
to only run with SKIP_BABEL = false
set
Rather than specifying certain build targets manually, it seems much more appropriate (and future-proof) to use the `SKIP_BABEL` build target instead. Also, the patch adds a missing `/* eslint no-var: error */` line since I'm touch the file anyway and no code-changes were necessary for it.
This commit is contained in:
parent
4af2755f71
commit
03387ebaa8
@ -12,13 +12,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* eslint no-var: error */
|
||||||
|
|
||||||
const globalScope = require('./global_scope');
|
const globalScope = require('./global_scope');
|
||||||
|
|
||||||
// Skip compatibility checks for the extensions and if we already ran
|
// Skip compatibility checks for modern builds and if we already ran the module.
|
||||||
// this module.
|
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('SKIP_BABEL')) &&
|
||||||
if ((typeof PDFJSDev === 'undefined' ||
|
|
||||||
!PDFJSDev.test('FIREFOX || MOZCENTRAL')) &&
|
|
||||||
!globalScope._pdfjsCompatibilityChecked) {
|
!globalScope._pdfjsCompatibilityChecked) {
|
||||||
|
|
||||||
globalScope._pdfjsCompatibilityChecked = true;
|
globalScope._pdfjsCompatibilityChecked = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user