@@ -390,25 +390,31 @@ class ResourceTagLib {
390
390
DispositionsUtils . doneDispositionResources(request, dispositionToRender)
391
391
}
392
392
393
- def script = { attributes , body ->
393
+ def script = { attributesAsParam , body ->
394
+ def attributes = [:] + attributesAsParam
394
395
attributes. type = " script"
395
396
if (! attributes. disposition) {
396
397
attributes. disposition = DispositionsUtils . DISPOSITION_DEFER
397
398
}
398
399
399
- stash (attributes, body)
400
+ doStash (attributes, body)
400
401
}
401
402
402
- def style = { attributes , body ->
403
+ def style = { attributesAsParam , body ->
404
+ def attributes = [:] + attributesAsParam
403
405
attributes. type = " style"
404
406
if (! attributes. disposition) {
405
407
attributes. disposition = DispositionsUtils . DISPOSITION_HEAD
406
408
}
407
409
408
- stash (attributes, body)
410
+ doStash (attributes, body)
409
411
}
410
-
412
+
411
413
def stash = { attributes , body ->
414
+ doStash(attributes, body)
415
+ }
416
+
417
+ private def doStash (attributes , body ) {
412
418
needsResourceLayout()
413
419
StashManager . stashPageFragment(request, (String ) attributes. type, (String ) attributes. disposition, (String ) body())
414
420
}
0 commit comments