{"record":{"id":"6112a69934106169","repo":"OrchardCMS/OrchardCore","slug":"super-expression-must-either-be-null-or-a-function","errorCode":null,"errorMessage":"Super expression must either be null or a function","messagePattern":"Super expression must either be null or a function","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Vendor/fontawesome-free-6.7.2/js/fontawesome.js","lineNumber":18,"sourceCode":"/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\n(function () {\n  'use strict';\n\n  function _defineProperty(e, r, t) {\n    return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n      value: t,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }) : e[r] = t, e;\n  }\n  function _inherits(t, e) {\n    if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n    t.prototype = Object.create(e && e.prototype, {\n      constructor: {\n        value: t,\n        writable: !0,\n        configurable: !0\n      }\n    }), Object.defineProperty(t, \"prototype\", {\n      writable: !1\n    }), e && _setPrototypeOf(t, e);\n  }\n  function ownKeys(e, r) {\n    var t = Object.keys(e);\n    if (Object.getOwnPropertySymbols) {\n      var o = Object.getOwnPropertySymbols(e);\n      r && (o = o.filter(function (r) {\n        return Object.getOwnPropertyDescriptor(e, r).enumerable;\n      })), t.push.apply(t, o);\n    }","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.Resources/wwwroot/Vendor/fontawesome-free-6.7.2/js/fontawesome.js#L1-L36","documentation":"Babel's _inherits helper throws this TypeError when class inheritance is compiled with a superclass that is neither a function nor null — i.e. the 'extends' expression did not evaluate to a constructor. Found in Font Awesome's bundled, transpiled fontawesome.js.","triggerScenarios":"Compiled class code like class A extends B where B is undefined, an object, or a non-constructor value at the time _inherits(B) runs.","commonSituations":"Script load order problems so the base class isn't defined yet; circular imports leaving the superclass undefined; a minified/bundled dependency collision replacing a class with an object; broken UMD/global export from a CDN script failing to load first.","solutions":["Fix script load order so the superclass module/bundle loads before fontawesome.js","Resolve circular imports or undefined exports of the base class","Check for duplicate/conflicting versions of libraries defining the parent class","Verify the CDN/script tag wasn't blocked (404/ad-blocker) leaving the dependency undefined"],"exampleFix":"// before\nclass Icon extends SomeLibrary.Thing // SomeLibrary failed to load => undefined\n// after\nif (typeof SomeLibrary === 'undefined') { console.error('SomeLibrary must be loaded first'); } else { class Icon extends SomeLibrary.Thing {} }","handlingStrategy":"validation","validationCode":"if (typeof SuperClass !== 'function' && SuperClass !== null) throw new TypeError('Expected a constructor to extend');","typeGuard":"function isConstructor(v) { return typeof v === 'function' && v.prototype?.constructor === v || typeof v === 'function'; }","tryCatchPattern":"try { initIcons(); } catch (e) { if (e instanceof TypeError && e.message.includes('Super expression')) console.error('A superclass bundle failed to load or export a class'); }","preventionTips":["Guarantee script load order for class-bearing bundles","Check browser console/network for blocked (404) vendor scripts","Watch for circular imports producing undefined classes"],"tags":["javascript","fontawesome","babel","inheritance"],"backgroundTag":"missing-dependency","analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}