mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 05:13:43 -05:00
Use an explicit prefix
This commit is contained in:
parent
f397678589
commit
e7f71a25d8
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
module.exports = (obj, methodName, key, logger) ->
|
module.exports = (obj, methodName, prefix, logger) ->
|
||||||
metrics = require('./metrics')
|
metrics = require('./metrics')
|
||||||
|
|
||||||
if typeof obj[methodName] != 'function'
|
if typeof obj[methodName] != 'function'
|
||||||
throw new Error("[Metrics] expected object property '#{methodName}' to be a function")
|
throw new Error("[Metrics] expected object property '#{methodName}' to be a function")
|
||||||
|
|
||||||
realMethod = obj[methodName]
|
realMethod = obj[methodName]
|
||||||
key = "methods.#{key}"
|
key = "#{prefix}.#{methodName}"
|
||||||
|
|
||||||
obj[methodName] = (originalArgs...) ->
|
obj[methodName] = (originalArgs...) ->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue