mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-23 07:13:57 +08:00
Fix zebra printer library load [SCI-7310] (#4502)
This commit is contained in:
parent
f87b42d042
commit
88d9ece237
2 changed files with 3 additions and 6 deletions
|
@ -56,11 +56,8 @@
|
|||
//= require_directory ./access_permissions
|
||||
//= require sidebar
|
||||
//= require turbolinks
|
||||
|
||||
<% if Rails.configuration.x.zebra_print_enabled %>
|
||||
//= require 'BrowserPrint-3.0.216.min'
|
||||
//= require 'BrowserPrint-Zebra-1.0.216.min'
|
||||
<% end %>
|
||||
//= require 'BrowserPrint-3.0.216.min'
|
||||
//= require 'BrowserPrint-Zebra-1.0.216.min'
|
||||
|
||||
// Initialize links for submitting forms. This is useful for submitting
|
||||
// forms with clicking on links outside form in cases when other than
|
||||
|
|
|
@ -96,7 +96,7 @@ var zebraPrint = (function() {
|
|||
try {
|
||||
beforeRefresh();
|
||||
BrowserPrint.getLocalDevices(function(deviceList) {
|
||||
if (deviceList.printer && deviceList.printer.length !== 0) {
|
||||
if (deviceList && deviceList.printer && deviceList.printer.length !== 0) {
|
||||
for (i = 0; i < deviceList.printer.length; i += 1) {
|
||||
getPrinterStatus(deviceList.printer[i]).then((device) => {
|
||||
addNewDevice(device, clearSelectorOnFirstDevice);
|
||||
|
|
Loading…
Reference in a new issue