File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/Efficiently/JqueryLaravel Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public function registerContentTags()
104104 $ replacement = <<<EOT
105105<?php
106106 \${$ recordName }Record = $ record;
107- if (! is_a( \${$ recordName }Record, "\IteratorAggregate")) {
107+ if (! is_array( \${ $ recordName } Record) && ! is_a( \${$ recordName }Record, "\IteratorAggregate")) {
108108 \${$ recordName }Record = new \Illuminate\Support\Collection([ \${$ recordName }Record]);
109109 }
110110 \${$ recordIndex } = -1;// -1 because we increment index at the beginnning of the loop
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function testContentTagFor()
8282 $ expect = <<<EOT
8383<?php
8484 \$projectRecord = \$project;
85- if (! is_a( \$projectRecord, "\IteratorAggregate")) {
85+ if (! is_array( \$ projectRecord) && ! is_a( \$projectRecord, "\IteratorAggregate")) {
8686 \$projectRecord = new \Illuminate\Support\Collection([ \$projectRecord]);
8787 }
8888 \$projectIndex = -1;// -1 because we increment index at the beginnning of the loop
@@ -121,7 +121,7 @@ public function testContentTagForWithOptions()
121121 $ expect = <<<EOT
122122<?php
123123 \$projectRecord = \$project;
124- if (! is_a( \$projectRecord, "\IteratorAggregate")) {
124+ if (! is_array( \$ projectRecord) && ! is_a( \$projectRecord, "\IteratorAggregate")) {
125125 \$projectRecord = new \Illuminate\Support\Collection([ \$projectRecord]);
126126 }
127127 \$projectIndex = -1;// -1 because we increment index at the beginnning of the loop
You can’t perform that action at this time.
0 commit comments