diff options
author | anekos | 2010-03-01 12:23:13 +0000 |
---|---|---|
committer | anekos | 2010-03-01 12:23:13 +0000 |
commit | 5468b2b3c060a538f92999dcb0a46bccf1f9cee0 (patch) | |
tree | 60e9918aeebc33eb75a0788ca53de96abf61e56b /_libly.js | |
parent | 8d09e455b73baa731177ba9f7d0386eb1dd6ad67 (diff) | |
download | vimperator-plugins-5468b2b3c060a538f92999dcb0a46bccf1f9cee0.tar.bz2 |
プラグインパスが見つからない場合は、echoerr した上で続行するようにした
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36890 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to '_libly.js')
-rwxr-xr-x | _libly.js | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -12,7 +12,7 @@ var PLUGIN_INFO = <description lang="ja">適当なライブラリっぽいものたち。</description> <author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author> <license>MIT</license> - <version>0.1.30</version> + <version>0.1.31</version> <minVersion>2.3pre</minVersion> <maxVersion>2.3pre</maxVersion> <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/_libly.js</updateURL> @@ -252,21 +252,23 @@ libly.$U = {//{{{ let restore = function () obj[name] = original; if (autoRestore) { let pluginPath = getPluginPath(); - if (!pluginPath) - throw 'getPluginPath failed'; - restores[pluginPath] = - (restores[pluginPath] || []).filter( - function (res) ( - res.object != obj || - res.name != name || - (res.restore() && false) - ) - ); - restores[pluginPath].push({ - object: obj, - name: name, - restore: restore - }); + if (pluginPath) { + restores[pluginPath] = + (restores[pluginPath] || []).filter( + function (res) ( + res.object != obj || + res.name != name || + (res.restore() && false) + ) + ); + restores[pluginPath].push({ + object: obj, + name: name, + restore: restore + }); + } else { + liberator.echoerr('getPluginPath failed'); + } } original = obj[name]; let current = obj[name] = function () { |