summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-05-12 10:32:27 +0200
committerGitHub <noreply@github.com>2020-05-12 10:32:27 +0200
commitb177969ea60cfd49603f255c456600a89143cd9f (patch)
tree6b3b86a2a1c2f716f73d98b98ac5a44735767d83 /core/src
parent901110f0686ba6252c2b5d21c0124011b22c8c32 (diff)
parent13b34ca0bec72c3be649de97a2a860ba8e3f8073 (diff)
downloadnextcloud-server-b177969ea60cfd49603f255c456600a89143cd9f.tar.gz
nextcloud-server-b177969ea60cfd49603f255c456600a89143cd9f.zip
Merge pull request #20922 from nextcloud/enhancement/debug-globals-trace
Log trace when deprecated globals are used
Diffstat (limited to 'core/src')
-rw-r--r--core/src/globals.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/globals.js b/core/src/globals.js
index e7f2b075374..a55392f3a74 100644
--- a/core/src/globals.js
+++ b/core/src/globals.js
@@ -53,11 +53,16 @@ import 'strengthify/strengthify.css'
import OC from './OC/index'
import OCP from './OCP/index'
import OCA from './OCA/index'
+import { debug } from './OC/debug'
import escapeHTML from 'escape-html'
import { getToken as getRequestToken } from './OC/requesttoken'
const warnIfNotTesting = function() {
- if (window.TESTING === undefined) {
+ const notTesting = window.TESTING === undefined
+ if (notTesting && debug) {
+ /* eslint-disable no-console */
+ console.trace.apply(console, arguments)
+ } else if (notTesting) {
console.warn.apply(console, arguments)
}
}