Skip to content

Commit 40bf909

Browse files
committed
Fix new treat byte array as string option to use REACT_APP prefix for consistency
1 parent f69d483 commit 40bf909

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ REACT_APP_LIVE_MONITOR_MAX=100
108108
# By default, PV Info treats byte arrays as strings. Change this to false to treat them as byte arrays.
109109
# PVWS was updated in 2024 to send "b64byt" instead of using the "text" field for these waveforms of chars
110110
# https://github.com/ornl-epics/pvws/pull/23
111-
PVWS_TREAT_BYTE_ARRAY_AS_STRING=true
111+
REACT_APP_PVWS_TREAT_BYTE_ARRAY_AS_STRING=true
112112

113113
# By default, PV Info does not allow the user to subscribe to waveform PVs. Switch this to true
114114
# to allow viewing of waveform PVs. Viewing large waveforms isn't useful in PV Info but

src/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function parseWebSocketMessage(jsonMessage, fixedPrecision = null) {
291291
pvData.pv_value = Array.prototype.slice.call(value_array);
292292
} else if ("b64byt" in pvData) {
293293
let bytes = toByteArray(pvData.b64byt);
294-
if (import.meta.env.PVWS_TREAT_BYTE_ARRAY_AS_STRING === "false") {
294+
if (import.meta.env.REACT_APP_PVWS_TREAT_BYTE_ARRAY_AS_STRING === "false") {
295295
let value_array = new Uint8Array(bytes.buffer);
296296
pvData.pv_value = Array.prototype.slice.call(value_array);
297297
} else {

0 commit comments

Comments
 (0)