diff --git a/js/plugin-directive.js b/js/plugin-directive.js index 62ea463..f90c70c 100644 --- a/js/plugin-directive.js +++ b/js/plugin-directive.js @@ -41,7 +41,7 @@ weechat.directive('plugin', ['$rootScope', function($rootScope) { // Scroll embed content into view var scroll = function() { var embed = document.querySelector(".embed_" + $scope.plugin.$$hashKey); - if (embed) { + if (embed && embed.scrollIntoViewIfNeeded !== undefined) { embed.scrollIntoViewIfNeeded(); } };