From 823cea36a77c8a3e0d4d3e8ce87571e9ef3bf8c5 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Wed, 12 Nov 2014 15:32:09 +0000 Subject: [PATCH] Insert additional JS in the right place --- Plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.php b/Plugin.php index e054071..9d47f87 100644 --- a/Plugin.php +++ b/Plugin.php @@ -83,7 +83,7 @@ class Plugin extends AbstractPlugin implements PluginInterface $script->setAttribute('type', 'text/javascript'); $last_index = count($args['button']->getChildren()) - 1; - $args['button']->addChildAt($script, $last_index - 1); + $args['button']->addChildAt($script, $last_index); } }