mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
Merge pull request #11624 from overleaf/jpa-hybrid-download-params
[web] add split tests for tweaking user content domain access check GitOrigin-RevId: a5e6959098c10ea230634492b465c2b9dcdd909f
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import getMeta from './meta'
|
||||
|
||||
export function isSplitTestEnabled(name: string) {
|
||||
return getMeta('ol-splitTestVariants')?.[name] === 'enabled'
|
||||
}
|
||||
|
||||
export function parseIntFromSplitTest(name: string, defaultValue: number) {
|
||||
const v = getMeta('ol-splitTestVariants')?.[name]
|
||||
const n = parseInt(v, 10)
|
||||
if (v === 'default' || Number.isNaN(n)) {
|
||||
return defaultValue
|
||||
}
|
||||
return n
|
||||
}
|
||||
Reference in New Issue
Block a user