Skip to content

Commit

Permalink
fix crash Writable map pushMap
Browse files Browse the repository at this point in the history
  • Loading branch information
tr3v3r committed Dec 11, 2023
1 parent 83a1def commit e9276b8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
public class EscPosPrinterDiscoveryModule extends ReactContextBaseJavaModule implements ActivityEventListener {

private Context mContext;
private WritableArray mPrinterList = null;
private final ReactApplicationContext reactContext;

public static final String NAME = "EscPosPrinterDiscovery";
Expand Down Expand Up @@ -182,7 +181,6 @@ private void sendEvent(ReactApplicationContext reactContext, String eventName, @
@ReactMethod
private void startDiscovery(final ReadableMap paramsMap, Promise promise) {
FilterOption mFilterOption = getFilterOptionsFromParams(paramsMap);
mPrinterList = Arguments.createArray();

try {
Discovery.start(mContext, mFilterOption, mDiscoveryListener);
Expand Down Expand Up @@ -246,6 +244,7 @@ public void onDiscovery(final DeviceInfo deviceInfo) {
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
WritableArray mPrinterList = Arguments.createArray();
WritableMap printerData = Arguments.createMap();


Expand Down

0 comments on commit e9276b8

Please sign in to comment.