You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@visualstation
Thanks for your reviewing the code. I agree your idea that non .js file should not preloaded.
Could you make push request to fix this issue? I really want record your contribution in the repo.
Please tell me if you have any difficulty to do so.
In action.php,
the value of $entrytype is css or js.
But in the switch/case, it's .css or .js.
But by default you are considering that everything is javascript, you could not see that the switch case was wrong.
foreach ($items as $entry) { // check file name extention $entrytype = pathinfo($entry, PATHINFO_EXTENSION); switch ($entrytype) { case "css": $event->data['link'][] = array( 'rel' => 'stylesheet', 'type' => 'text/css', 'href' => $entry, ); break; case "js": $event->data['script'][] = array( 'type' => 'text/javascript', 'charset' => 'utf-8', 'src' => $entry, '_data' => '', ); break; default: break; } }
Thus, the case default should be empty to avoid bad handling.
The text was updated successfully, but these errors were encountered: