1111 * @docs -private
1212 */
1313export function throwNullPortalError ( ) {
14- throw new Error ( 'Must provide a portal to attach' ) ;
14+ throw Error ( 'Must provide a portal to attach' ) ;
1515}
1616
1717/**
1818 * Throws an exception when attempting to attach a portal to a host that is already attached.
1919 * @docs -private
2020 */
2121export function throwPortalAlreadyAttachedError ( ) {
22- throw new Error ( 'Host already has a portal attached' ) ;
22+ throw Error ( 'Host already has a portal attached' ) ;
2323}
2424
2525/**
2626 * Throws an exception when attempting to attach a portal to an already-disposed host.
2727 * @docs -private
2828 */
2929export function throwPortalHostAlreadyDisposedError ( ) {
30- throw new Error ( 'This PortalHost has already been disposed' ) ;
30+ throw Error ( 'This PortalHost has already been disposed' ) ;
3131}
3232
3333/**
3434 * Throws an exception when attempting to attach an unknown portal type.
3535 * @docs -private
3636 */
3737export function throwUnknownPortalTypeError ( ) {
38- throw new Error ( 'Attempting to attach an unknown Portal type. BasePortalHost accepts either' +
38+ throw Error ( 'Attempting to attach an unknown Portal type. BasePortalHost accepts either' +
3939 'a ComponentPortal or a TemplatePortal.' ) ;
4040}
4141
@@ -44,13 +44,13 @@ export function throwUnknownPortalTypeError() {
4444 * @docs -private
4545 */
4646export function throwNullPortalHostError ( ) {
47- throw new Error ( 'Attempting to attach a portal to a null PortalHost' ) ;
47+ throw Error ( 'Attempting to attach a portal to a null PortalHost' ) ;
4848}
4949
5050/**
5151 * Throws an exception when attempting to detach a portal that is not attached.
5252 * @docs -privatew
5353 */
5454export function throwNoPortalAttachedError ( ) {
55- throw new Error ( 'Attempting to detach a portal that is not attached to a host' ) ;
55+ throw Error ( 'Attempting to detach a portal that is not attached to a host' ) ;
5656}
0 commit comments