From f1fab103e7d85ff60292f9b3774162e0a47070da Mon Sep 17 00:00:00 2001 From: Adriaan Zonnenberg Date: Thu, 14 Jan 2021 22:15:21 +0100 Subject: [PATCH] Don't render script tag when JavaScript check is disabled --- src/Views/Honey.php | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Views/Honey.php b/src/Views/Honey.php index b18648c..c065a40 100644 --- a/src/Views/Honey.php +++ b/src/Views/Honey.php @@ -20,23 +20,25 @@ public function __construct(InputNameSelector $inputNameSelector) public function render() { return <<<'blade' - @once - - @endonce + @if (in_array(\Lukeraymonddowning\Honey\Checks\JavascriptInputFilledCheck::class, config('honey.checks'))) + @once + + @endonce + @endif
@@ -63,4 +65,4 @@ public function javascriptTimeout() { return config('honey.minimum_time_passed') * 1000; } -} \ No newline at end of file +}