Update plugin.js

Fixed #6608