mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Ensure Requirements_Backend respects explicit false for async/defer
This commit is contained in:
parent
0cf5d4cbe2
commit
4f614423ad
@ -416,19 +416,19 @@ class Requirements_Backend
|
|||||||
|
|
||||||
// make sure that async/defer is set if it is set once even if file is included multiple times
|
// make sure that async/defer is set if it is set once even if file is included multiple times
|
||||||
$async = (
|
$async = (
|
||||||
isset($options['async']) && isset($options['async']) == true
|
isset($options['async']) && $options['async']
|
||||||
|| (
|
|| (
|
||||||
isset($this->javascript[$file])
|
isset($this->javascript[$file])
|
||||||
&& isset($this->javascript[$file]['async'])
|
&& isset($this->javascript[$file]['async'])
|
||||||
&& $this->javascript[$file]['async'] == true
|
&& $this->javascript[$file]['async']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$defer = (
|
$defer = (
|
||||||
isset($options['defer']) && isset($options['defer']) == true
|
isset($options['defer']) && $options['defer']
|
||||||
|| (
|
|| (
|
||||||
isset($this->javascript[$file])
|
isset($this->javascript[$file])
|
||||||
&& isset($this->javascript[$file]['defer'])
|
&& isset($this->javascript[$file]['defer'])
|
||||||
&& $this->javascript[$file]['defer'] == true
|
&& $this->javascript[$file]['defer']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->javascript[$file] = array(
|
$this->javascript[$file] = array(
|
||||||
|
Loading…
Reference in New Issue
Block a user