src/Twigpack.php
public function injectErrorEntry()
    {
        if (Craft::$app->getResponse()->isServerError || Craft::$app->getResponse()->isClientError) {
            $settings = self::$plugin->getSettings();
            if (!empty($settings->errorEntry) && $settings->useDevServer) {
                try {
                    $tags = self::$plugin->manifest->getJsModuleTags($settings->errorEntry, false);
                    if ($tags !== null) {
                        echo $tags;
                    }
                } catch (NotFoundHttpException $e) {
                    // That's okay, Twigpack will have already logged the error
                }
            }
        }
    }
public function injectErrorEntry()
    {
        if (Craft::$app->getResponse()->isServerError || Craft::$app->getResponse()->isClientError) {
            $settings = self::$plugin->getSettings();
            if (!empty($settings->errorEntry) && $settings->useDevServer) {
                try {
                    $tags = self::$plugin->manifest->getJsModuleTags($settings->errorEntry, false);
                    if ($tags !== null) {
                        echo $tags;
                    }
                } catch (NotFoundHttpException $e) {
                    // That's okay, Twigpack will have already logged the error
                }
            }
        }
    }
public function injectErrorEntry ( ) { if ( Craft :: $ app -> getResponse ( ) -> isServerError || Craft :: $ app -> getResponse ( ) -> isClientError ) { $ settings = self :: $ plugin -> getSettings ( ) ; if ( ! empty ( $ settings -> errorEntry ) && $ settings -> useDevServer ) { try { $ tags = self :: $ plugin -> manifest -> getJsModuleTags ( $ settings -> errorEntry , false ) ; if ( $ tags !== null ) { echo $ tags ; } } catch ( NotFoundHttpException $ e ) { // That's okay, Twigpack will have already logged the error } } } }
Inject the error entry point JavaScript for auto-reloading of Twig error pages
Inject the error entry point JavaScript for auto - reloading of Twig error pages